26 lines
682 B
Nix
26 lines
682 B
Nix
{ config, ... }:
|
|
{
|
|
boot.initrd.kernelModules = [ "usb_storage" ];
|
|
|
|
boot.initrd.luks.devices = {
|
|
"${config.networking.hostName}-luks0" = {
|
|
device = "/dev/disk/by-partlabel/${config.networking.hostName}-luks0";
|
|
allowDiscards = true;
|
|
keyFileSize = 32;
|
|
keyFile = "/dev/zero";
|
|
#keyFile = "/etc/luks-zero.key";
|
|
};
|
|
};
|
|
#boot.initrd.systemd.contents = {
|
|
# "/etc/luks-zero.key".source = ./luks-zero.key;
|
|
#};
|
|
fileSystems."/" = {
|
|
device = "/dev/disk/by-label/${config.networking.hostName}-root";
|
|
fsType = "ext4";
|
|
};
|
|
fileSystems."/boot" = {
|
|
device = "/dev/disk/by-label/BOOT";
|
|
fsType = "vfat";
|
|
};
|
|
}
|