74 lines
1.8 KiB
Nix
74 lines
1.8 KiB
Nix
{inputs, ...}: {
|
|
imports = with inputs; [
|
|
disko.nixosModules.disko
|
|
];
|
|
disko.devices.disk.main = {
|
|
type = "disk";
|
|
device = "/dev/nvme0n1";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
ESP = {
|
|
size = "2G";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = [
|
|
"umask=0077"
|
|
"fmask=0022"
|
|
"dmask=0022"
|
|
"noexec"
|
|
];
|
|
};
|
|
};
|
|
luks = {
|
|
size = "100%";
|
|
content = {
|
|
type = "luks";
|
|
name = "luks-main";
|
|
initrdUnlock = true;
|
|
settings.allowDiscards = true;
|
|
content = {
|
|
type = "btrfs";
|
|
extraArgs = ["-f"];
|
|
subvolumes = {
|
|
"@nixos" = {
|
|
mountpoint = "/";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
# "noexec"
|
|
];
|
|
};
|
|
"home" = {
|
|
mountpoint = "/home";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
"@storage" = {
|
|
mountpoint = "/storage";
|
|
mountOptions = [
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
# "@nix" = {
|
|
# mountpoint = "/nix";
|
|
# mountOptions = [
|
|
# "compress=zstd"
|
|
# "noatime"
|
|
# ];
|
|
# };
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|