mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
update btrfs
This commit is contained in:
parent
1fddc7c389
commit
939abc56da
1 changed files with 40 additions and 48 deletions
|
|
@ -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";
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue