storage-refactor #9

Open
jan-leila wants to merge 38 commits from storage-refactor into main
Showing only changes of commit dfcacdc6fb - Show all commits

View file

@ -40,6 +40,37 @@ in {
config = lib.mkMerge [
(lib.mkIf config.storage.zfs.enable {
# Create ZFS datasets based on storage.datasets configuration
storage.datasets = {
local = {
"" = {
type = "zfs_fs";
};
"nix" = {
type = "zfs_fs";
mount = {
enable = true;
mountPoint = "/nix";
};
snapshot = {
autoSnapshot = false;
};
atime = "off";
relatime = "off";
};
};
replicate = {
"" = {
type = "zfs_fs";
};
"system/var/log" = {
type = "zfs_fs";
mount = {
enable = true;
mountPoint = "/var/log";
};
};
};
};
})
(lib.mkIf (config.storage.zfs.enable && config.storage.impermanence.enable) {
storage.datasets = {
@ -58,28 +89,7 @@ in {
};
};
};
local = {
"nix" = {
type = "zfs_fs";
mount = {
enable = true;
mountPoint = "/nix";
};
snapshot = {
autoSnapshot = false;
};
atime = "off";
relatime = "off";
};
};
replicate = {
"system/var/log" = {
type = "zfs_fs";
mount = {
enable = true;
mountPoint = "/var/log";
};
};
"system/root" = {
mount = {
enable = true;
@ -146,9 +156,6 @@ in {
storage.datasets = {
# Base organizational datasets (only needed when impermanence is disabled)
local = {
"" = {
type = "zfs_fs";
};
"root" = {
type = "zfs_fs";
mount = {
@ -178,9 +185,6 @@ in {
};
};
replicate = {
"" = {
type = "zfs_fs";
};
"system/var/log" = {
type = "zfs_fs";
mount = {