From 7574644e040f5a0b2aa9357a7c0b5701935139de Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 8 Dec 2024 16:55:58 +0100 Subject: feat(modules/impermanance): Also support the extended `directory` notation --- modules/by-name/im/impermanence/module.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'modules/by-name/im') 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" -- cgit 1.4.1