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 [
|
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 = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue