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/appspec.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'apps/static-users/appspec.nix') diff --git a/apps/static-users/appspec.nix b/apps/static-users/appspec.nix index 6ab5c7d..cb55ea7 100644 --- a/apps/static-users/appspec.nix +++ b/apps/static-users/appspec.nix @@ -1,12 +1,21 @@ -{ lib, ... }: { +{ appConfig, lib, ... }: { description = "static-users"; endOfLife = null; options.users = lib.mkOption { - type = lib.types.attrsOf (lib.types.submodule { + type = lib.types.attrsOf (lib.types.submodule ({ name, ... }: { + options.passwordFile = lib.mkOption { + type = lib.types.nullOr lib.types.str; + default = "system-secrets/${appConfig.appId}/${appConfig.users.${name}.username}.password"; + }; options.publicKeyFile = lib.mkOption { - type = lib.types.path; + type = lib.types.nullOr lib.types.path; + default = null; + }; + options.username = lib.mkOption { + type = lib.types.str; + default = name; }; - }); + })); default = { }; }; } -- cgit v1.2.3