feat: moved some datasets to common zfs storage config
This commit is contained in:
parent
c2701ea8f0
commit
dfcacdc6fb
1 changed files with 31 additions and 27 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue