From 597ec76b7cb1527b1df215548a8f50bddccd8606 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Fri, 23 Feb 2024 08:07:11 +0100 Subject: apps/authelia: init --- apps/static-users/capabilities.nix | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'apps/static-users/capabilities.nix') diff --git a/apps/static-users/capabilities.nix b/apps/static-users/capabilities.nix index de8d1f0..1861888 100644 --- a/apps/static-users/capabilities.nix +++ b/apps/static-users/capabilities.nix @@ -1,8 +1,14 @@ -{ appConfig, lib, ... }: -lib.concatMapAttrs - (name: attrs: lib.optionalAttrs (attrs ? publicKeyFile) { - ${name} = { - inherit (attrs) publicKeyFile; - }; - }) - appConfig.users +{ appConfig, config, lib, ... }: +{ + password-credentials = lib.concatMapAttrs + (name: attrs: lib.optionalAttrs (attrs.passwordFile != null) { + ${name} = { inherit (attrs) username passwordFile; }; + }) + # TODO appConfig should come from config to have been fully evaluated + config.fysiweb-apps.${appConfig.owner}.${appConfig.appName}.${appConfig.appInstanceName}.users; + ssh-credentials = lib.concatMapAttrs + (name: attrs: lib.optionalAttrs (attrs.publicKeyFile != null) { + ${name} = { inherit (attrs) publicKeyFile; }; + }) + appConfig.users; +} -- cgit v1.2.3