fixes - systemd
This commit is contained in:
parent
7893c9effa
commit
0c6fe348d8
|
@ -27,7 +27,8 @@ in {
|
||||||
{
|
{
|
||||||
_module.args = {
|
_module.args = {
|
||||||
disk = "/dev/vda";
|
disk = "/dev/vda";
|
||||||
withSwap = false;
|
withSwap = true;
|
||||||
|
swapSize = "16";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -88,12 +89,14 @@ in {
|
||||||
initrd = {
|
initrd = {
|
||||||
kernelModules = ["uas" "usbcore" "usb_storage" "vfat" "nls_cp437" "nls_iso8859_1"];
|
kernelModules = ["uas" "usbcore" "usb_storage" "vfat" "nls_cp437" "nls_iso8859_1"];
|
||||||
# Mount USB key before trying to decrypt root filesystem
|
# Mount USB key before trying to decrypt root filesystem
|
||||||
postDeviceCommands = pkgs.lib.mkBefore ''
|
# postDeviceCommands = pkgs.lib.mkBefore ''
|
||||||
mkdir -m 0755 -p /key
|
# mkdir -m 0755 -p /key
|
||||||
sleep 2 # To make sure the usb key has been loaded
|
# 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
|
# 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
|
systemd.enable = true; # tpm2 unlock requires systemd initrd
|
||||||
|
|
||||||
luks.devices."crypted" = {
|
luks.devices."crypted" = {
|
||||||
bypassWorkqueues = true;
|
bypassWorkqueues = true;
|
||||||
device = "/dev/nvme0n1p2";
|
device = "/dev/nvme0n1p2";
|
||||||
|
@ -109,16 +112,19 @@ in {
|
||||||
keyFile = "/key/hdd.key";
|
keyFile = "/key/hdd.key";
|
||||||
|
|
||||||
# Use this if you want to fallback to the encryption password when the drive can't be found. HIGHLY RECCOMENDED!!!!
|
# 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 = [
|
kernelParams = [
|
||||||
|
|
||||||
# hibernation
|
# hibernation
|
||||||
"resume_offset=533760"
|
"resume_offset=533760"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
swapDevices = [ { device = "/swap"; size=16*1024; } ];
|
||||||
|
|
||||||
# ================ HYPRLAND =================== #
|
# ================ HYPRLAND =================== #
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
|
|
Loading…
Reference in New Issue