diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-02-23 08:07:11 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-02-26 04:36:24 +0100 |
commit | 597ec76b7cb1527b1df215548a8f50bddccd8606 (patch) | |
tree | 9ea88686f3b15689e222a1d286a6726f6ce59ace /modules/fysiweb-secrets | |
parent | d2873fe0f6a117d7157c2a6f204a864f9edeb668 (diff) |
apps/authelia: init
Diffstat (limited to 'modules/fysiweb-secrets')
-rw-r--r-- | modules/fysiweb-secrets/default.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/fysiweb-secrets/default.nix b/modules/fysiweb-secrets/default.nix new file mode 100644 index 0000000..e494dde --- /dev/null +++ b/modules/fysiweb-secrets/default.nix @@ -0,0 +1,27 @@ +{ config, lib, ... }: +let + allApps = lib.concatMap lib.attrValues (lib.concatMap lib.attrValues (lib.attrValues config.fysiweb-apps)); +in +{ + options.fysiweb.secrets = lib.mkOption { + type = lib.types.listOf (lib.types.submodule { + options = { + type = lib.mkOption { + type = lib.types.enum [ "random-string" ]; + }; + path = lib.mkOption { + type = lib.types.str; + }; + }; + }); + default = [ ]; + }; + config = { + fysiweb.secrets = lib.concatMap + (appConfig: + let path = (toString ../../apps) + "/${appConfig.appName}/secrets.nix"; in + lib.optionals (lib.pathIsRegularFile path) + (import path { inherit appConfig lib; })) + allApps; + }; +} |