Testing anew key
This commit is contained in:
parent
d82a14f445
commit
39d18b3560
2 changed files with 4 additions and 2 deletions
|
@ -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"
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue