aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-08 16:55:58 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-08 16:55:58 +0100
commit7574644e040f5a0b2aa9357a7c0b5701935139de (patch)
tree7527645596d29eb8cd9ac9c07be082583d8170b5 /modules
parentfix(modules/ollama): Also set the correct visibility (diff)
downloadnixos-config-7574644e040f5a0b2aa9357a7c0b5701935139de.zip
feat(modules/impermanance): Also support the extended `directory` notation
Diffstat (limited to 'modules')
-rw-r--r--modules/by-name/im/impermanence/module.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/by-name/im/impermanence/module.nix b/modules/by-name/im/impermanence/module.nix
index 140e0754..9c289346 100644
--- a/modules/by-name/im/impermanence/module.nix
+++ b/modules/by-name/im/impermanence/module.nix
@@ -9,7 +9,16 @@ in {
enable = lib.mkEnableOption "persisting directories and files with impermanence";
directories = lib.mkOption {
- type = lib.types.listOf lib.types.str;
+ type = lib.types.listOf (lib.types.either lib.types.str (lib.types.submodule {
+ options = {
+ directory = lib.mkOption {
+ type = lib.types.str;
+ };
+ mode = lib.mkOption {
+ type = lib.types.str;
+ };
+ };
+ }));
description = "The directories to persist";
};
};
@@ -22,6 +31,7 @@ in {
users.soispha = {
directories = [
+ # TODO: These should all be moved to their respective modules <2024-12-08>
".local/share"
".local/state/nvim"