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 = {