X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix%2FNUR.git;a=blobdiff_plain;f=modules%2Fsecrets.nix;h=a2424e920fd78eb62021fb70bfb4db8bedb53e73;hp=808b15c5bdeb886347a8f9c34f69891495e0999f;hb=55ebe7be7375fe58c5e8a6f8edc31f768ddf5e6f;hpb=589aeb9297f6f2a99b98c07cb9a834bb5e25b9f0 diff --git a/modules/secrets.nix b/modules/secrets.nix index 808b15c5..a2424e92 100644 --- a/modules/secrets.nix +++ b/modules/secrets.nix @@ -11,7 +11,16 @@ default = "/var/secrets"; description = "Location where to put the keys"; }; + # Read-only variables + fullPaths = lib.mkOption { + type = lib.types.attrsOf lib.types.path; + default = builtins.listToAttrs + (map (v: { name = v.dest; value = "${config.secrets.location}/${v.dest}"; }) config.secrets.keys); + readOnly = true; + description = "set of full paths to secrets"; + }; }; + config = let location = config.secrets.location; keys = config.secrets.keys;