update btrfs

This commit is contained in:
Primrose 2025-06-29 20:01:02 +02:00
parent 1fddc7c389
commit 939abc56da
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -27,60 +27,52 @@
extraOpenArgs = []; extraOpenArgs = [];
settings.allowDiscards = true; settings.allowDiscards = true;
content = { content = {
type = "lvm_pv"; type = "gpt";
vg = "pool"; partitions = {
}; # Set swap device as resume device
}; swap = {
}; size = "4G";
}; content = {
}; type = "swap";
}; discardPolicy = "both";
}; resumeDevice = true;
};
};
# Use LVM to create a partition for swap # Use btrfs over ext4 for:
lvm_vg = { # - compression
pool = { # nix store can be shrinked using this feature
type = "lvm_vg"; # - more transparent partitions (subvolumes)
lvs = { # no more "I need more space here and not there"
# Set swap device as resume device btrfs = {
swap = { size = "100%";
size = "4G"; content = {
content = { type = "btrfs";
type = "swap";
discardPolicy = "both";
resumeDevice = true;
};
};
# Use btrfs over ext4 for: mountpoint = "/btrfs-root";
# - compression
# nix store can be shrinked using this feature
# - more transparent partitions (subvolumes)
# no more "I need more space here and not there"
btrfs = {
size = "100%";
content = {
type = "btrfs";
mountpoint = "/btrfs-root"; # # DANGER:
# # Override existing partition at partition creation
# extraArgs = ["-f"];
# # DANGER: subvolumes = {
# # Override existing partition at partition creation "/root" = {
# extraArgs = ["-f"]; mountpoint = "/";
};
subvolumes = { "/home" = {
"/root" = { mountOptions = ["compress=zstd"];
mountpoint = "/"; mountpoint = "/home";
}; };
"/home" = { "/nix" = {
mountOptions = ["compress=zstd"]; mountOptions = ["compress=zstd" "noatime"];
mountpoint = "/home"; mountpoint = "/nix";
}; };
};
"/nix" = { };
mountOptions = ["compress=zstd" "noatime"]; };
mountpoint = "/nix"; };
}; };
}; };
}; };