Files
nixos-blueprint/hosts/dunamis/disko/disk-main.nix
T
unexplrd dd5ffd3c83 hosts/dunamis/disko/disk-main.nix: refactor
hosts/sarien/disko/default.nix: source dunamis/disko/disk-main.nix

Signed-off-by: unexplrd <unexplrd@linerds.us>
2025-11-27 14:33:33 +02:00

60 lines
1.4 KiB
Nix

{disk, ...}: {
type = "disk";
device = disk;
content = {
type = "gpt";
partitions = {
ESP = {
size = "2G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"umask=0077"
"fmask=0022"
"dmask=0022"
"noexec"
"nosuid"
"nodev"
];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "luks-main";
initrdUnlock = true;
settings.allowDiscards = true;
content = let
mountOptions = ["autodefrag" "compress-force=zstd" "noatime"];
in {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
"@nixos-root" = {
mountpoint = "/";
mountOptions = mountOptions ++ ["noexec"];
};
"@home" = {
mountpoint = "/home";
inherit mountOptions;
};
"@storage" = {
mountpoint = "/storage";
inherit mountOptions;
};
"@nix" = {
mountpoint = "/nix";
inherit mountOptions;
};
};
};
};
};
};
};
}