From 4db8bdf4439a85a2c133218525b2775bb4fd22fd Mon Sep 17 00:00:00 2001 From: iFargle Date: Mon, 5 Feb 2024 21:20:40 +0900 Subject: [PATCH] test --- nixos/hosts/nixos-framework/disks.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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