add FDE for quadphone and quadtop
This commit is contained in:
parent
14a2d77ca4
commit
4c451ce3df
3 changed files with 50 additions and 12 deletions
14
clients/quadphone/fde.nix
Normal file
14
clients/quadphone/fde.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
# The image is built with an empty LUKS passphrase (systemd-repart can't take a
|
||||||
|
# key file through the NixOS image builder). After flashing, set a real passphrase
|
||||||
|
# and rotate the volume key, since the image's key is sitting in the nix store:
|
||||||
|
# run0 systemd-cryptenroll --password --wipe-slot=empty /dev/disk/by-partlabel/nixos
|
||||||
|
# run0 cryptsetup reencrypt /dev/disk/by-partlabel/nixos
|
||||||
|
image.repart.partitions."30-root".repartConfig.Encrypt = "key-file";
|
||||||
|
|
||||||
|
boot.initrd = {
|
||||||
|
luks.forceLuksSupportInInitrd = true;
|
||||||
|
availableKernelModules = [ "msm" ];
|
||||||
|
unl0kr.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
36
clients/quadtop/disko.nix
Normal file
36
clients/quadtop/disko.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
{ inputs, ... }:
|
||||||
|
{
|
||||||
|
imports = [ inputs.disko.nixosModules.disko ];
|
||||||
|
disko.devices.disk.main = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/nvme0n1";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
ESP = {
|
||||||
|
size = "1G";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
luks = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "luks";
|
||||||
|
name = "cryptroot";
|
||||||
|
settings.allowDiscards = true;
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -14,17 +14,5 @@
|
||||||
extraModulePackages = [ ];
|
extraModulePackages = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems = {
|
|
||||||
"/" = {
|
|
||||||
device = "/dev/disk/by-uuid/15598217-e3e1-4922-b336-8e9f62fad939";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
"/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/C6EC-B430";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.cpu.intel.updateMicrocode = true;
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue