{ pkgs, ... }: { services.fstrim.enable = true; services.zfs = { trim.enable = true; autoScrub = { enable = true; pools = [ "zpool" ]; interval = "weekly"; randomizedDelaySec = "6h"; }; }; networking.hostId = "41ba28ff"; boot = { zfs.forceImportRoot = false; plymouth.enable = false; tmp.useTmpfs = true; }; # unlock over ssh boot.initrd.network = { enable = true; ssh = { enable = true; port = 2222; hostKeys = [ /etc/secrets/initrd/ssh_host_rsa_key ]; authorizedKeys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJl9iYG5oHBq/poBn7Jf1/FGWWbAnbx+NKjs7qtT3uAK 0xa@toaster 2024-12-31" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAXrwZsBChUhVuF5gFEfj8GwQlnrqEttAytS5jVCfuE4 0xa@frituurpan" ]; }; }; boot.initrd.systemd.services.zfs-setup-root-profile = { wantedBy = [ "initrd.target" ]; before = [ "initrd-root-fs.target" ]; unitConfig.DefaultDependencies = false; script = '' mkdir -p /var/empty echo "systemd-tty-ask-password-agent --watch" > /var/empty/.profile ''; serviceConfig.Type = "oneshot"; }; # support for network boot.initrd.kernelModules = [ "igc" "i40e" "mt7921e" ]; boot.kernelModules = [ "igc" "i40e" "mt7921e" ]; }