diff --git a/nixos/hosts/nixos-framework/disks.nix b/nixos/hosts/nixos-framework/disks.nix index 2d4c476f..3756c733 100644 --- a/nixos/hosts/nixos-framework/disks.nix +++ b/nixos/hosts/nixos-framework/disks.nix @@ -3,7 +3,10 @@ services.btrfs.autoScrub.enable = true; services.btrfs.autoScrub.interval = "weekly"; - boot.initrd.systemd.enable = true; + boot.initrd.secrets = { + # Create /mnt/etc/secrets/initrd directory and copy keys to it + "swap.key" = "/etc/secrets/initrd/swap.key"; + }; disko.devices.disk.nvme0 = { device = "/dev/nvme0n1"; @@ -75,16 +78,16 @@ type = "luks"; name = "SWAP"; settings = { - keyFile = "/etc/swap.key"; + keyFile = "/swap.key"; allowDiscards = true; - }; + }; # content content = { type = "swap"; resumeDevice = true; # Hibernation - }; - }; + }; # content.ontent + };# content } # partition 3 (SWAP) ]; # partitions }; # content }; # disko.devices.disk.nvme0 -} # root +} # nix