aboutsummaryrefslogtreecommitdiffstats
path: root/apps/static-users/capabilities.nix
blob: 33679ad481b6738c46857ca81693b0fa043e9eee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
{ 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: { ${name} = { inherit (attrs) publicKeyFiles; }; })
    appConfig.users;
}