fix: fixed more datasets
This commit is contained in:
parent
2f7bbf3e1c
commit
16089e0371
36 changed files with 44 additions and 40 deletions
|
|
@ -12,6 +12,14 @@ in {
|
|||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
persistencePath = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default =
|
||||
if osConfig.storage.generateBase
|
||||
then "/persist/replicate/home"
|
||||
else "/persist";
|
||||
description = "The base path for user home persistence. The impermanence module will automatically append the user's home directory path. Automatically adapts based on whether the system uses the new dataset layout or the legacy one.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
|
|
@ -26,11 +34,7 @@ in {
|
|||
# If impermanence is not enabled for this user but system impermanence is enabled,
|
||||
# persist the entire home directory as fallback
|
||||
(lib.mkIf (osConfig.storage.impermanence.enable && !cfg.enable && cfg.fallbackPersistence.enable) {
|
||||
home.persistence."${
|
||||
if osConfig.storage.generateBase
|
||||
then "/persist/replicate/home"
|
||||
else "/persist/home/${config.home.username}"
|
||||
}" = {
|
||||
home.persistence."${cfg.persistencePath}" = {
|
||||
directories = ["."];
|
||||
allowOther = true;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue