69 lines
2.3 KiB
Nix
69 lines
2.3 KiB
Nix
{
|
||
# checkout the example folder for how to configure different disko layouts
|
||
disko.devices = {
|
||
disk.fw16-2280 = {
|
||
device = "/dev/disk/by-path/pci-0000:05:00.0-nvme-1";
|
||
content = {
|
||
type = "gpt";
|
||
partitions = {
|
||
esp = {
|
||
size = "2G";
|
||
type = "EF00";
|
||
content = {
|
||
type = "filesystem";
|
||
format = "vfat";
|
||
mountpoint = "/boot";
|
||
mountOptions = ["noatime" "fmask=0077" "dmask=0077"];
|
||
};
|
||
};
|
||
cryptall = {
|
||
size = "100%";
|
||
content = {
|
||
type = "luks";
|
||
name = "all";
|
||
settings = {
|
||
# allowDiscards = true;
|
||
# keyFile = "/tmp/secret.key";
|
||
};
|
||
content = {
|
||
type = "btrfs";
|
||
extraArgs = ["-f"];
|
||
subvolumes = {
|
||
# System state which should be persistent across reboots and possibly backed up.
|
||
"/@nixos-persist" = {
|
||
mountpoint = "/persist";
|
||
mountOptions = ["noatime" "compress=zstd"];
|
||
};
|
||
# I’m not so interested in backing up logs but I want them to be preserved across reboots,
|
||
# so I’m dedicating a subvolume to logs rather than using the persist subvolume.
|
||
"/@nixos-varlog" = {
|
||
mountpoint = "/var/log";
|
||
mountOptions = ["noatime" "compress=zstd"];
|
||
};
|
||
# Needs to be persistent but is not worth backing up, as it’s trivial to reconstruct.
|
||
"/@nixos-nix" = {
|
||
mountpoint = "/nix";
|
||
mountOptions = ["noatime" "compress=zstd"];
|
||
};
|
||
|
||
"/@data" = {
|
||
mountpoint = "/data";
|
||
mountOptions = ["noatime" "compress=zstd"];
|
||
};
|
||
"/@home-evar" = {
|
||
mountpoint = "/home/evar";
|
||
mountOptions = ["noatime" "compress=zstd"];
|
||
};
|
||
};
|
||
};
|
||
};
|
||
};
|
||
};
|
||
};
|
||
};
|
||
nodev."/" = {
|
||
fsType = "tmpfs";
|
||
mountOptions = ["size=25%" "mode=755"];
|
||
};
|
||
};
|
||
}
|