fix: fixed trailing mount path issue

This commit is contained in:
Leyla Becker 2025-11-23 15:35:26 -06:00
parent 2922114367
commit a4f3b3141d
4 changed files with 17 additions and 4 deletions

View file

@ -87,7 +87,10 @@ in {
neededForBoot = true;
}
)
config.storage.impermanence.datasets;
(lib.filterAttrs (
datasetName: dataset: dataset.impermanence.enable
)
config.storage.impermanence.datasets);
environment.persistence =
lib.mapAttrs (datasetName: dataset: {
@ -116,7 +119,10 @@ in {
in
(enabledDirectories != {}) || (enabledFiles != {})
)
config.storage.impermanence.datasets);
(lib.filterAttrs (
datasetName: dataset: dataset.impermanence.enable
)
config.storage.impermanence.datasets));
}
(lib.mkIf config.storage.zfs.enable {
storage.zfs.datasets =

View file

@ -43,6 +43,7 @@ in {
storage.datasets = {
local = {
"nix" = {
impermanence.enable = false;
type = "zfs_fs";
mount = "/nix";
snapshot = {
@ -54,6 +55,7 @@ in {
};
replicate = {
"system/var/log" = {
impermanence.enable = false;
type = "zfs_fs";
mount = "/var/log";
};
@ -78,13 +80,13 @@ in {
# TODO: can we auto set the mount points on these to just be `"/persist/local/${name}"`
local = {
"" = {
mount = "/persist/local/";
mount = "/persist/local";
};
};
# TODO: can we auto set the mount points on these to just be `"/persist/replicate/${name}"`
replicate = {
"" = {
mount = "/persist/replicate/";
mount = "/persist/replicate";
};
"system/root" = {
mount = "/persist/replicate/system/root";

View file

@ -44,6 +44,10 @@ in {
type = lib.types.attrsOf (lib.types.submodule pathTypeSubmodule);
default = {};
};
impermanence.enable = lib.mkOption {
type = lib.types.bool;
default = true;
};
};
config = {