feat: Impermanence (home)
This commit is contained in:
@@ -9,44 +9,14 @@ in {
|
||||
sydnix.impermanence = {
|
||||
enable = mkEnableOption "impermanence";
|
||||
|
||||
mutableDotfiles = {
|
||||
enable = mkEnableOption "dotfiles under impermanence";
|
||||
|
||||
# storeAt = mkOption {
|
||||
# default = "dots/config";
|
||||
# type = types.str;
|
||||
# # type = with types;
|
||||
# # addCheck
|
||||
# # path
|
||||
# # (x: cfg.mutableDotfiles.enable
|
||||
# # -> ! (elem x cfg.mutableDotfiles.directories));
|
||||
# };
|
||||
|
||||
files = mkOption {
|
||||
default = [];
|
||||
# FIXME: Inaccurate type.
|
||||
type = with types;
|
||||
listOf anything;
|
||||
};
|
||||
|
||||
directories = mkOption {
|
||||
default = [];
|
||||
# FIXME: Inaccurate type.
|
||||
type = with types;
|
||||
listOf anything;
|
||||
};
|
||||
};
|
||||
|
||||
directories = mkOption {
|
||||
# type = with types;
|
||||
# listOf (coercedTo str (d: { directory = d; }) userDir);
|
||||
default = [];
|
||||
type = types.listOf types.anything;
|
||||
};
|
||||
|
||||
files = mkOption {
|
||||
# type = with types;
|
||||
# listOf (coercedTo str (f: { file = f; }) userFile);
|
||||
default = [];
|
||||
type = types.listOf types.anything;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -58,16 +28,6 @@ in {
|
||||
directories = cfg.directories;
|
||||
files = cfg.files;
|
||||
};
|
||||
} // (if ! cfg.mutableDotfiles.enable
|
||||
then {}
|
||||
else {
|
||||
"/persist/dots/users/${config.home.username}/dots/" = {
|
||||
removePrefixDirectory = true;
|
||||
directories = cfg.mutableDotfiles.directories;
|
||||
files = cfg.mutableDotfiles.files;
|
||||
allowOther = true;
|
||||
};
|
||||
});
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user