fixes - systemd
This commit is contained in:
parent
7893c9effa
commit
0c6fe348d8
|
@ -27,7 +27,8 @@ in {
|
|||
{
|
||||
_module.args = {
|
||||
disk = "/dev/vda";
|
||||
withSwap = false;
|
||||
withSwap = true;
|
||||
swapSize = "16";
|
||||
};
|
||||
}
|
||||
]
|
||||
|
@ -88,12 +89,14 @@ in {
|
|||
initrd = {
|
||||
kernelModules = ["uas" "usbcore" "usb_storage" "vfat" "nls_cp437" "nls_iso8859_1"];
|
||||
# Mount USB key before trying to decrypt root filesystem
|
||||
postDeviceCommands = pkgs.lib.mkBefore ''
|
||||
mkdir -m 0755 -p /key
|
||||
sleep 2 # To make sure the usb key has been loaded
|
||||
mount -n -t vfat -o ro `findfs UUID=${PRIMARYUSBID}` /key || mount -n -t vfat -o ro `findfs UUID=${BACKUPUSBID}` /key
|
||||
'';
|
||||
# postDeviceCommands = pkgs.lib.mkBefore ''
|
||||
# mkdir -m 0755 -p /key
|
||||
# sleep 2 # To make sure the usb key has been loaded
|
||||
# mount -n -t vfat -o ro `findfs UUID=${PRIMARYUSBID}` /key || mount -n -t vfat -o ro `findfs UUID=${BACKUPUSBID}` /key
|
||||
# '';
|
||||
|
||||
systemd.enable = true; # tpm2 unlock requires systemd initrd
|
||||
|
||||
luks.devices."crypted" = {
|
||||
bypassWorkqueues = true;
|
||||
device = "/dev/nvme0n1p2";
|
||||
|
@ -109,16 +112,19 @@ in {
|
|||
keyFile = "/key/hdd.key";
|
||||
|
||||
# Use this if you want to fallback to the encryption password when the drive can't be found. HIGHLY RECCOMENDED!!!!
|
||||
fallbackToPassword = true;
|
||||
#~~~~~ Actually it doesn't work as it is implied by systemd stage 1...
|
||||
# fallbackToPassword = true;
|
||||
|
||||
};
|
||||
};
|
||||
resumeDevice = config.fileSystems."/swap".device;
|
||||
resumeDevice = "/dev/nvme0n1"; # should be pointing to part. where swap resides
|
||||
kernelParams = [
|
||||
|
||||
# hibernation
|
||||
"resume_offset=533760"
|
||||
];
|
||||
};
|
||||
swapDevices = [ { device = "/swap"; size=16*1024; } ];
|
||||
|
||||
# ================ HYPRLAND =================== #
|
||||
environment.sessionVariables = {
|
||||
|
|
Loading…
Reference in New Issue