6 Commits

Author SHA1 Message Date
4d4e9d980b [initssh] add iproute2
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m55s
2025-11-15 15:48:40 +01:00
beb3839a6b [initssh] add wireguard-tools 2025-11-15 15:47:38 +01:00
0df32bf47c [initssh] fix busybox 2025-11-15 15:47:02 +01:00
f6bbbdec3e [initssh] add pkgs.busybox to initrd
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m47s
2025-11-15 15:11:47 +01:00
2a5539c204 [fanny] import storage in systemd script
All checks were successful
Check flake syntax / flake-check (push) Successful in 8m51s
2025-11-15 14:51:51 +01:00
9588103e67 [fanny] import storage on boot
All checks were successful
Check flake syntax / flake-check (push) Successful in 4m52s
2025-11-15 14:30:57 +01:00
2 changed files with 9 additions and 1 deletions

View File

@@ -86,6 +86,7 @@ in
enable = true;
authorizedKeys = sshKeys.admins;
ethernetDrivers = ["r8169"];
zfsExtraPools = [ "storage" ];
};
boot.initrd = {

View File

@@ -22,6 +22,11 @@ in
description = "Ethernet drivers to load: run `lspci -k | grep -iA4 ethernet`";
example = "r8169";
};
zfsExtraPools = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
description = "Name or GUID of extra ZFS pools that you wish to import during boot.";
};
};
config = lib.mkIf (cfg.enable && config.malobeo.disks.encryption) {
@@ -32,11 +37,12 @@ in
zfs = {
forceImportAll = true;
requestEncryptionCredentials = true;
extraPools = cfg.zfsExtraPools;
};
initrd = {
availableKernelModules = cfg.ethernetDrivers;
systemd = {
initrdBin = [ pkgs.busybox pkgs.wireguard-tools pkgs.iproute2 ];
enable = true;
network.enable = true;
};
@@ -56,6 +62,7 @@ in
path = with pkgs; [ zfs ];
serviceConfig.Type = "oneshot";
script = ''
zpool import storage
echo "zfs load-key -a; killall zfs; systemctl default" >> /var/empty/.profile
'';
};