aboutsummaryrefslogtreecommitdiffstats
path: root/apps/static-users/appspec.nix
blob: 92ec8baa9e43d09eae39ac111dc974620516a519 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ appConfig, lib, ... }: {
  description = "static-users";
  endOfLife = null;
  options.users = lib.mkOption {
    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.publicKeyFiles = lib.mkOption {
        type = lib.types.listOf lib.types.path;
        default = [ ];
      };
      options.username = lib.mkOption {
        type = lib.types.str;
        default = name;
      };
    }));
    default = { };
  };
}