storage-refactor #9

Open
jan-leila wants to merge 40 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 [ config = lib.mkMerge [
(lib.mkIf config.storage.zfs.enable { (lib.mkIf config.storage.zfs.enable {
# Create ZFS datasets based on storage.datasets configuration # 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) { (lib.mkIf (config.storage.zfs.enable && config.storage.impermanence.enable) {
storage.datasets = { 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 = { replicate = {
"system/var/log" = {
type = "zfs_fs";
mount = {
enable = true;
mountPoint = "/var/log";
};
};
"system/root" = { "system/root" = {
mount = { mount = {
enable = true; enable = true;
@ -146,9 +156,6 @@ in {
storage.datasets = { storage.datasets = {
# Base organizational datasets (only needed when impermanence is disabled) # Base organizational datasets (only needed when impermanence is disabled)
local = { local = {
"" = {
type = "zfs_fs";
};
"root" = { "root" = {
type = "zfs_fs"; type = "zfs_fs";
mount = { mount = {
@ -178,9 +185,6 @@ in {
}; };
}; };
replicate = { replicate = {
"" = {
type = "zfs_fs";
};
"system/var/log" = { "system/var/log" = {
type = "zfs_fs"; type = "zfs_fs";
mount = { mount = {