Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions example/btrfs-subvolumes.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
mountOptions = ["umask=0077"];
};
};
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
extraArgs = ["-f"]; # Override existing partition
mountOptions = ["compress=zstd"];
# Subvolumes must set a mountpoint in order to be mounted,
# unless their parent is mounted
subvolumes = {
Expand All @@ -34,21 +35,17 @@
};
# Subvolume name is the same as the mountpoint
"/home" = {
mountOptions = [ "compress=zstd" ];
mountpoint = "/home";
};
# Sub(sub)volume doesn't need a mountpoint as its parent is mounted
"/home/user" = { };
"/home/user" = {};
# Parent is not mounted so the mountpoint must be set
"/nix" = {
mountOptions = [
"compress=zstd"
"noatime"
];
mountOptions = ["noatime"];
mountpoint = "/nix";
};
# This subvolume will be created but not mounted
"/test" = { };
"/test" = {};
# Subvolume for the swapfile
"/swap" = {
mountpoint = "/.swapvol";
Expand Down
Loading
Loading