test
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
system,
|
system,
|
||||||
...
|
...
|
||||||
@@ -46,8 +45,6 @@ in
|
|||||||
ESP = {
|
ESP = {
|
||||||
priority = 2;
|
priority = 2;
|
||||||
name = "ESP";
|
name = "ESP";
|
||||||
# start = "1G";
|
|
||||||
# end = "2G";
|
|
||||||
size = "1G";
|
size = "1G";
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
content = {
|
content = {
|
||||||
@@ -57,61 +54,68 @@ in
|
|||||||
mountOptions = [ "umask=0077" ];
|
mountOptions = [ "umask=0077" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
root = {
|
root = {
|
||||||
name = "btrfs-root";
|
name = "bcachefs-root";
|
||||||
size = "100%";
|
size = "100%";
|
||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "bcachefs";
|
||||||
extraArgs = [ "-f" ]; # Override existing partition
|
filesystem = "main_fs"; # Reference to filesystem below
|
||||||
# Subvolumes must set a mountpoint in order to be mounted,
|
extraFormatArgs = [ "--discard" ];
|
||||||
# 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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
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