mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
vanadium/disko: remove lvm under btrfs
This commit is contained in:
parent
9b02b9e1da
commit
7fab12c21f
1 changed files with 32 additions and 62 deletions
|
|
@ -8,7 +8,7 @@
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
ESP = {
|
ESP = {
|
||||||
size = "500M";
|
size = "512M";
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
|
|
@ -27,67 +27,37 @@
|
||||||
extraOpenArgs = [ ];
|
extraOpenArgs = [ ];
|
||||||
settings.allowDiscards = true;
|
settings.allowDiscards = true;
|
||||||
content = {
|
content = {
|
||||||
type = "lvm_pv";
|
type = "btrfs";
|
||||||
vg = "pool";
|
# # DANGER:
|
||||||
};
|
# # Override existing partition at partition creation
|
||||||
};
|
# extraArgs = ["-f"];
|
||||||
};
|
subvolumes = {
|
||||||
};
|
"/root" = {
|
||||||
};
|
mountOptions = [
|
||||||
};
|
"compress=zstd"
|
||||||
};
|
"noatime"
|
||||||
|
];
|
||||||
# Use LVM to create a partition for swap
|
mountpoint = "/";
|
||||||
lvm_vg = {
|
};
|
||||||
pool = {
|
"/home" = {
|
||||||
type = "lvm_vg";
|
mountOptions = [
|
||||||
lvs = {
|
"compress=zstd"
|
||||||
# Set swap device as resume device
|
"noatime"
|
||||||
swap = {
|
];
|
||||||
size = "48G"; # > 32G for hibernation
|
mountpoint = "/home";
|
||||||
content = {
|
};
|
||||||
type = "swap";
|
"/nix" = {
|
||||||
discardPolicy = "both";
|
mountOptions = [
|
||||||
resumeDevice = true;
|
"compress=zstd"
|
||||||
};
|
"noatime"
|
||||||
};
|
];
|
||||||
|
mountpoint = "/nix";
|
||||||
# Use btrfs over ext4 for:
|
};
|
||||||
# - compression
|
"/swap" = {
|
||||||
# nix store can be shrinked using this feature
|
mountpoint = "/.swapvol";
|
||||||
# - more transparent partitions (subvolumes)
|
swap.swapfile.size = "1G";
|
||||||
# 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"];
|
|
||||||
|
|
||||||
subvolumes = {
|
|
||||||
"/root" = {
|
|
||||||
mountOptions = [ "noatime" ];
|
|
||||||
mountpoint = "/";
|
|
||||||
};
|
|
||||||
|
|
||||||
"/home" = {
|
|
||||||
mountOptions = [
|
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
mountpoint = "/home";
|
|
||||||
};
|
|
||||||
|
|
||||||
"/nix" = {
|
|
||||||
mountOptions = [
|
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
mountpoint = "/nix";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue