Files
JakeHillion 9ca96c3363
commit-validation / validate-single-commit (pull_request) Successful in 2s
flake / flake (push) Successful in 3m27s
nix-builder (x86_64-linux) Build completed successfully
nix-builder (aarch64-linux) Build completed successfully
maverick: migrate to sfp interface
2026-01-14 20:38:32 +00:00

53 lines
1.2 KiB
Nix

{ config, pkgs, lib, ... }:
{
imports = [
./disko.nix
];
config = lib.mkMerge [
{
boot = {
## Mirrored grub
loader.efi.canTouchEfiVariables = true;
loader.grub = {
enable = true;
efiSupport = true;
device = "nodev"; # leave it to mirroredBoots
mirroredBoots = lib.mkOverride 51 [
{
devices = [ "/dev/nvme0n1" ];
path = "/boot0";
}
{
devices = [ "/dev/nvme1n1" ];
path = "/boot1";
}
];
};
};
## Setup but don't enable tang, that depends on the device's location
custom.tang = {
networkingModule = "i40e";
secretFile = "/data/disk_encryption.jwe";
devices = [ "disk0-crypt" "disk1-crypt" ];
};
# Delegation
custom.impermanence.enable = true;
}
(lib.mkIf config.custom.tang.enable {
boot.kernelParams =
let
ifcfg = builtins.head config.networking.interfaces.enp5s0f1np1.ipv4.addresses;
in
[ "ip=${ifcfg.address}::${config.networking.defaultGateway.address}:255.255.255.0:${config.networking.hostName}:enp5s0f1np1:none" ];
})
];
}