test
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
system,
|
||||
...
|
||||
@@ -46,8 +45,6 @@ in
|
||||
ESP = {
|
||||
priority = 2;
|
||||
name = "ESP";
|
||||
# start = "1G";
|
||||
# end = "2G";
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
@@ -57,61 +54,68 @@ in
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
|
||||
root = {
|
||||
name = "btrfs-root";
|
||||
name = "bcachefs-root";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ]; # Override existing partition
|
||||
# Subvolumes must set a mountpoint in order to be mounted,
|
||||
# unless their parent is mounted
|
||||
subvolumes = {
|
||||
"home" = {
|
||||
mountOptions = [ "compress=zstd" ];
|
||||
mountpoint = "/home";
|
||||
};
|
||||
"root" = {
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
mountpoint = "/root";
|
||||
};
|
||||
"nix" = {
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
"etc" = {
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
mountpoint = "/etc";
|
||||
};
|
||||
"tmp" = {
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
mountpoint = "/tmp";
|
||||
};
|
||||
"log" = {
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
mountpoint = "/var/log";
|
||||
};
|
||||
};
|
||||
type = "bcachefs";
|
||||
filesystem = "main_fs"; # Reference to filesystem below
|
||||
extraFormatArgs = [ "--discard" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
bcachefs_filesystems = {
|
||||
main_fs = {
|
||||
type = "bcachefs_filesystem";
|
||||
extraFormatArgs = [
|
||||
"--compression=zstd"
|
||||
"--background_compression=zstd"
|
||||
];
|
||||
subvolumes = {
|
||||
# Root subvolume
|
||||
"subvolumes/root" = {
|
||||
mountpoint = "/root";
|
||||
mountOptions = [
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
# Home subvolume
|
||||
"subvolumes/home" = {
|
||||
mountpoint = "/home";
|
||||
};
|
||||
# Nix store
|
||||
"subvolumes/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
# Etc
|
||||
"subvolumes/etc" = {
|
||||
mountpoint = "/etc";
|
||||
mountOptions = [
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
# Tmp
|
||||
"subvolumes/tmp" = {
|
||||
mountpoint = "/tmp";
|
||||
mountOptions = [
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
# Log
|
||||
"subvolumes/log" = {
|
||||
mountpoint = "/var/log";
|
||||
mountOptions = [
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user