diff --git a/hosts/common/compute-node.nix b/hosts/common/compute-node.nix index c9023a1..0930432 100644 --- a/hosts/common/compute-node.nix +++ b/hosts/common/compute-node.nix @@ -4,16 +4,9 @@ ./impermanence.nix ./sshd.nix ./user-ppetru.nix + ./unattended-encryption.nix ]; - boot.initrd.kernelModules = [ "usb_storage" ]; - boot.initrd.luks.devices."luksroot" = { - allowDiscards = true; - bypassWorkqueues = true; - keyFileSize = 4096; - keyFile = "/dev/sda"; - }; - # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; diff --git a/hosts/common/unattended-encryption.nix b/hosts/common/unattended-encryption.nix new file mode 100644 index 0000000..fae8d58 --- /dev/null +++ b/hosts/common/unattended-encryption.nix @@ -0,0 +1,9 @@ +{ + boot.initrd.kernelModules = [ "usb_storage" ]; + boot.initrd.luks.devices."luksroot" = { + allowDiscards = true; + bypassWorkqueues = true; + keyFileSize = 4096; + keyFile = "/dev/sda"; + }; +}