fix all the issues with persistence, and change GLaDOS to btrfs as an experiment

This commit is contained in:
Lillian Violet 2026-02-15 17:06:15 +01:00
parent e86ec419c2
commit 022ec828a8
6 changed files with 84 additions and 49 deletions

View file

@ -30,8 +30,34 @@
allowDiscards = true;
};
content = {
type = "lvm_pv";
vg = "nvme_pool";
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = ["subvol=root" "compress=zstd:1" "noatime" "ssd" "discard=async" "space_cache=v2" "commit=120"];
};
"/home" = {
mountpoint = "/home";
mountOptions = ["subvol=home" "compress=zstd:1" "noatime" "ssd" "discard=async" "space_cache=v2" "commit=120" "autodefrag"];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = ["subvol=nix" "compress=zstd:1" "noatime" "ssd" "discard=async" "space_cache=v2" "commit=120" "nodatacow" "nodatasum"];
};
"/persist" = {
mountpoint = "/persistent";
mountOptions = ["subvol=persistent" "compress=zstd:1" "noatime" "ssd" "discard=async" "space_cache=v2" "commit=120"];
};
"/log" = {
mountpoint = "/var/log";
mountOptions = ["subvol=log" "compress=zstd:1" "noatime" "ssd" "discard=async" "space_cache=v2" "commit=120" "nodatacow" "nodatasum"];
};
"/swap" = {
mountpoint = "/swap";
swap.swapfile.size = "8G";
};
};
};
};
};
@ -39,32 +65,6 @@
};
};
};
lvm_vg = {
nvme_pool = {
type = "lvm_vg";
lvs = {
nvme_swap = {
size = "32G";
content = {
type = "swap";
discardPolicy = "both";
resumeDevice = true; # resume from hiberation from this device
};
};
nvme_root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [
"defaults"
];
};
};
};
};
};
nodev = {
"/home/lillian/Downloads" = {
fsType = "tmpfs";