From 39d18b35602044cabff064c9c49501e823880d71 Mon Sep 17 00:00:00 2001 From: iFargle Date: Mon, 5 Feb 2024 19:15:57 +0900 Subject: [PATCH] Testing anew key --- docs/install.sh | 2 +- nixos/hosts/nixos-framework/disks.nix | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/install.sh b/docs/install.sh index 1cd0fa0d..7181f988 100755 --- a/docs/install.sh +++ b/docs/install.sh @@ -48,7 +48,7 @@ if [ ! -e "nixos/hosts/$TARGET_HOST/disks.nix" ]; then fi # Create a key for encrypted swap, if needed -echo -n "$(head -c32 /dev/random | base64)" > /tmp/swap.key +echo "$(head -c32 /dev/random | base64)" > /tmp/swap.key echo "WARNING! The disks in $TARGET_HOST are about to get wiped" echo " NixOS will be re-installed" diff --git a/nixos/hosts/nixos-framework/disks.nix b/nixos/hosts/nixos-framework/disks.nix index 44985634..453a90eb 100644 --- a/nixos/hosts/nixos-framework/disks.nix +++ b/nixos/hosts/nixos-framework/disks.nix @@ -20,6 +20,8 @@ content = { type = "filesystem"; format = "vfat"; + # https://github.com/nix-community/disko/issues/527 + mountOptions = [ "umask=0077" ]; mountpoint = "/boot"; }; } # partition 1 (ESP) @@ -72,7 +74,7 @@ type = "luks"; name = "SWAP"; settings = { - keyFile = "/etc/swap.key"; + keyFile = "/tmp/swap.key"; allowDiscards = true; }; content = {