2024-09-02 18:31:19 +05:30
|
|
|
_: {
|
|
|
|
boot = {
|
|
|
|
initrd = {
|
|
|
|
availableKernelModules = [
|
|
|
|
"xhci_pci"
|
2024-09-02 20:51:39 +05:30
|
|
|
"thunderbolt"
|
2024-09-02 18:31:19 +05:30
|
|
|
"nvme"
|
|
|
|
"usb_storage"
|
|
|
|
"sd_mod"
|
|
|
|
];
|
2024-09-02 20:51:39 +05:30
|
|
|
luks.devices."cryptroot".device = "/dev/disk/by-uuid/9de352ea-128f-4d56-a720-36d81dfd9b92";
|
2024-09-02 18:31:19 +05:30
|
|
|
};
|
|
|
|
kernelModules = [
|
|
|
|
"kvm-intel"
|
|
|
|
"thinkpad_acpi"
|
2024-09-02 20:51:39 +05:30
|
|
|
# "iwlwifi"
|
|
|
|
"xe"
|
2024-09-02 18:31:19 +05:30
|
|
|
];
|
2024-09-02 20:51:39 +05:30
|
|
|
kernelParams = [
|
|
|
|
"quiet"
|
|
|
|
"xe.force_probe=7d55"
|
|
|
|
"i915.force_probe=!7d55"
|
|
|
|
# "resume_offset=2465529"
|
|
|
|
"intel_pstate=active"
|
|
|
|
"thinkpad_acpi.fan_control=1"
|
2024-09-02 18:31:19 +05:30
|
|
|
];
|
2024-09-02 20:51:39 +05:30
|
|
|
# resumeDevice = "/dev/disk/by-uuid/870fde90-a91a-4554-8b1c-d5702c789f4d";
|
2024-09-02 18:31:19 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
2024-09-02 20:51:39 +05:30
|
|
|
device = "/dev/disk/by-uuid/870fde90-a91a-4554-8b1c-d5702c789f4d";
|
2024-09-02 18:31:19 +05:30
|
|
|
fsType = "btrfs";
|
|
|
|
options = [
|
|
|
|
"defaults"
|
2024-09-02 20:51:39 +05:30
|
|
|
"autodefrag"
|
2024-09-02 18:31:19 +05:30
|
|
|
"compress-force=zstd"
|
|
|
|
"noatime"
|
|
|
|
"ssd"
|
|
|
|
"subvol=@"
|
|
|
|
];
|
|
|
|
neededForBoot = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
"/home" = {
|
2024-09-02 20:51:39 +05:30
|
|
|
device = "/dev/disk/by-uuid/870fde90-a91a-4554-8b1c-d5702c789f4d";
|
2024-09-02 18:31:19 +05:30
|
|
|
fsType = "btrfs";
|
|
|
|
options = [
|
|
|
|
"defaults"
|
2024-09-02 20:51:39 +05:30
|
|
|
"autodefrag"
|
2024-09-02 18:31:19 +05:30
|
|
|
"compress-force=zstd"
|
|
|
|
"noatime"
|
|
|
|
"ssd"
|
|
|
|
"subvol=@home"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
"/.snapshots" = {
|
2024-09-02 20:51:39 +05:30
|
|
|
device = "/dev/disk/by-uuid/870fde90-a91a-4554-8b1c-d5702c789f4d";
|
2024-09-02 18:31:19 +05:30
|
|
|
fsType = "btrfs";
|
|
|
|
options = [
|
|
|
|
"defaults"
|
|
|
|
"compress-force=zstd"
|
|
|
|
"noatime"
|
|
|
|
"ssd"
|
|
|
|
"subvol=@snapshots"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
"/var/log" = {
|
2024-09-02 20:51:39 +05:30
|
|
|
device = "/dev/disk/by-uuid/870fde90-a91a-4554-8b1c-d5702c789f4d";
|
2024-09-02 18:31:19 +05:30
|
|
|
fsType = "btrfs";
|
|
|
|
options = [
|
|
|
|
"defaults"
|
2024-09-02 20:51:39 +05:30
|
|
|
"autodefrag"
|
2024-09-02 18:31:19 +05:30
|
|
|
"compress-force=zstd"
|
|
|
|
"noatime"
|
|
|
|
"ssd"
|
|
|
|
"subvol=@log"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
"/var/cache" = {
|
2024-09-02 20:51:39 +05:30
|
|
|
device = "/dev/disk/by-uuid/870fde90-a91a-4554-8b1c-d5702c789f4d";
|
2024-09-02 18:31:19 +05:30
|
|
|
fsType = "btrfs";
|
|
|
|
options = [
|
|
|
|
"defaults"
|
2024-09-02 20:51:39 +05:30
|
|
|
"autodefrag"
|
2024-09-02 18:31:19 +05:30
|
|
|
"compress-force=zstd"
|
|
|
|
"noatime"
|
|
|
|
"ssd"
|
|
|
|
"subvol=@cache"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
"/etc/nixos" = {
|
2024-09-02 20:51:39 +05:30
|
|
|
device = "/dev/disk/by-uuid/870fde90-a91a-4554-8b1c-d5702c789f4d";
|
2024-09-02 18:31:19 +05:30
|
|
|
fsType = "btrfs";
|
|
|
|
options = [
|
|
|
|
"defaults"
|
|
|
|
"compress-force=zstd"
|
|
|
|
"noatime"
|
|
|
|
"ssd"
|
|
|
|
"subvol=@nix-config"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
"/nix" = {
|
2024-09-02 20:51:39 +05:30
|
|
|
device = "/dev/disk/by-uuid/870fde90-a91a-4554-8b1c-d5702c789f4d";
|
2024-09-02 18:31:19 +05:30
|
|
|
fsType = "btrfs";
|
|
|
|
options = [
|
|
|
|
"defaults"
|
2024-09-02 20:51:39 +05:30
|
|
|
"autodefrag"
|
2024-09-02 18:31:19 +05:30
|
|
|
"compress-force=zstd"
|
|
|
|
"noatime"
|
|
|
|
"ssd"
|
|
|
|
"subvol=@nix-store"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-09-02 20:51:39 +05:30
|
|
|
# TODO: setup swap
|
2024-09-02 18:31:19 +05:30
|
|
|
# ref: https://sawyershepherd.org/post/hibernating-to-an-encrypted-swapfile-on-btrfs-with-nixos/
|
2024-09-02 20:51:39 +05:30
|
|
|
# "/swap" = {
|
|
|
|
# device = "/dev/disk/by-uuid/870fde90-a91a-4554-8b1c-d5702c789f4d";
|
|
|
|
# fsType = "btrfs";
|
|
|
|
# options = [
|
|
|
|
# "subvol=@swap"
|
|
|
|
# "noatime"
|
|
|
|
# ];
|
|
|
|
# };
|
2024-09-02 18:31:19 +05:30
|
|
|
|
|
|
|
"/boot" = {
|
2024-09-02 20:51:39 +05:30
|
|
|
device = "/dev/disk/by-uuid/7FBB-9E80";
|
2024-09-02 18:31:19 +05:30
|
|
|
fsType = "vfat";
|
2024-09-02 20:51:39 +05:30
|
|
|
options = ["fmask=0022" "dmask=0022"];
|
2024-09-02 18:31:19 +05:30
|
|
|
};
|
|
|
|
};
|
2024-09-02 20:51:39 +05:30
|
|
|
swapDevices = [];
|
2024-09-02 18:31:19 +05:30
|
|
|
}
|