104 lines
2.3 KiB
Nix
104 lines
2.3 KiB
Nix
{ ... }:
|
|
{
|
|
swappiness = 10;
|
|
|
|
boot = {
|
|
resumeDevice = "/dev/disk/by-uuid/56ad966f-3268-4b59-999a-48a082bb8052";
|
|
|
|
initrd = {
|
|
verbose = true;
|
|
systemd = {
|
|
emergencyAccess = "$y$j9T$yu1NICt8J9IFQ3wmgViop1$8rCHUrMNN2dCQeSt8f4h73Wrw5oUKoojuhetYyV7yN";
|
|
enable = true;
|
|
};
|
|
|
|
luks.devices.cryptedroot.device = "/dev/disk/by-partlabel/disk-main-luks";
|
|
|
|
availableKernelModules = [
|
|
"xhci_pci"
|
|
"nvme"
|
|
"thunderbolt"
|
|
"usbhid"
|
|
"usb_storage"
|
|
"sd_mod"
|
|
"rtsx_pci_sdmmc"
|
|
];
|
|
|
|
kernelModules = [
|
|
"kvm-intel"
|
|
];
|
|
};
|
|
|
|
kernelModules = [
|
|
"kvm-intel"
|
|
"i2c-dev"
|
|
];
|
|
|
|
kernelParams = [
|
|
"usbcore.autosuspend=-1"
|
|
"quiet"
|
|
"modeset"
|
|
];
|
|
};
|
|
|
|
disko.devices.disk.main = {
|
|
type = "disk";
|
|
device = "/dev/nvme0n1";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
ESP = {
|
|
size = "512M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = [ "umask=0077" ];
|
|
};
|
|
};
|
|
luks = {
|
|
size = "100%";
|
|
content = {
|
|
type = "luks";
|
|
name = "cryptedroot";
|
|
passwordFile = "/tmp/secret.key";
|
|
settings.allowDiscards = true;
|
|
content = {
|
|
type = "btrfs";
|
|
extraArgs = [ "-f" ];
|
|
subvolumes = {
|
|
"/root" = {
|
|
mountpoint = "/";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
"/home" = {
|
|
mountpoint = "/home";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
"/nix" = {
|
|
mountpoint = "/nix";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
"/swap" = {
|
|
mountpoint = "/.swapvol";
|
|
swap.swapfile.size = "16G";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|