fix: fixed trailing mount path issue
This commit is contained in:
parent
2922114367
commit
a4f3b3141d
4 changed files with 17 additions and 4 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -407,6 +407,7 @@ in {
|
|||
mount = SOPS_AGE_KEY_DIRECTORY;
|
||||
atime = "off";
|
||||
relatime = "off";
|
||||
impermanence.enable = false;
|
||||
};
|
||||
}
|
||||
(lib.mkIf (!config.storage.impermanence.enable) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue