nixos/hosts/laptop/disk-configuration.nix

71 lines
2 KiB
Nix
Raw Normal View History

2025-02-18 20:17:57 +01:00
_: {
2025-02-03 07:55:17 +01:00
disko.devices = {
disk = {
2025-02-18 20:17:57 +01:00
main = {
device = "/dev/disk/by-id/nvme-SAMSUNG_MZVLB512HBJQ-000L2_S4DYNF0M893481";
2025-02-03 07:55:17 +01:00
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
ESP = {
2025-05-20 19:25:57 +02:00
size = "1G";
2025-02-03 07:55:17 +01:00
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = ["defaults"];
};
};
2025-05-20 19:25:57 +02:00
windows = {
size = "150G";
type = "0700"; # for Microsoft basic data
content = {
type = "filesystem";
format = "ntfs";
};
};
2025-02-03 07:55:17 +01:00
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
2025-02-18 20:17:57 +01:00
# Copied by deploy script, otherwise it will prompt for password
passwordFile = "/luks-password";
2025-02-03 07:55:17 +01:00
settings = {
allowDiscards = true;
bypassWorkqueues = true;
};
content = {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
"@" = {
mountpoint = "/";
mountOptions = ["compress=zstd" "noatime"];
};
"@nix" = {
mountpoint = "/nix";
mountOptions = ["compress=zstd" "noatime"];
};
"@home" = {
mountpoint = "/home";
mountOptions = ["compress=zstd" "noatime"];
};
};
};
};
};
};
};
};
};
};
}