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
|
fi
|
||||||
|
|
||||||
# Create a key for encrypted swap, if needed
|
# 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 "WARNING! The disks in $TARGET_HOST are about to get wiped"
|
||||||
echo " NixOS will be re-installed"
|
echo " NixOS will be re-installed"
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "vfat";
|
format = "vfat";
|
||||||
|
# https://github.com/nix-community/disko/issues/527
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
mountpoint = "/boot";
|
mountpoint = "/boot";
|
||||||
};
|
};
|
||||||
} # partition 1 (ESP)
|
} # partition 1 (ESP)
|
||||||
|
@ -72,7 +74,7 @@
|
||||||
type = "luks";
|
type = "luks";
|
||||||
name = "SWAP";
|
name = "SWAP";
|
||||||
settings = {
|
settings = {
|
||||||
keyFile = "/etc/swap.key";
|
keyFile = "/tmp/swap.key";
|
||||||
allowDiscards = true;
|
allowDiscards = true;
|
||||||
};
|
};
|
||||||
content = {
|
content = {
|
||||||
|
|
Loading…
Reference in a new issue