diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-02-23 03:23:54 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-02-26 04:36:24 +0100 |
commit | 323973ecbb71b6186290a798af1c8a2c91299e18 (patch) | |
tree | f041e769aa593be6aab4e0f765fdd6c9b51164b7 /apps | |
parent | 1057e0990509faa333843c7ab52536a95d50e7cc (diff) |
apps/static-users: init
Diffstat (limited to 'apps')
-rw-r--r-- | apps/static-users/appspec.nix | 12 | ||||
-rw-r--r-- | apps/static-users/capabilities.nix | 8 | ||||
-rw-r--r-- | apps/static-users/module.nix | 1 |
3 files changed, 21 insertions, 0 deletions
diff --git a/apps/static-users/appspec.nix b/apps/static-users/appspec.nix new file mode 100644 index 0000000..6ab5c7d --- /dev/null +++ b/apps/static-users/appspec.nix @@ -0,0 +1,12 @@ +{ lib, ... }: { + description = "static-users"; + endOfLife = null; + options.users = lib.mkOption { + type = lib.types.attrsOf (lib.types.submodule { + options.publicKeyFile = lib.mkOption { + type = lib.types.path; + }; + }); + default = { }; + }; +} diff --git a/apps/static-users/capabilities.nix b/apps/static-users/capabilities.nix new file mode 100644 index 0000000..de8d1f0 --- /dev/null +++ b/apps/static-users/capabilities.nix @@ -0,0 +1,8 @@ +{ appConfig, lib, ... }: +lib.concatMapAttrs + (name: attrs: lib.optionalAttrs (attrs ? publicKeyFile) { + ${name} = { + inherit (attrs) publicKeyFile; + }; + }) + appConfig.users diff --git a/apps/static-users/module.nix b/apps/static-users/module.nix new file mode 100644 index 0000000..c915eb0 --- /dev/null +++ b/apps/static-users/module.nix @@ -0,0 +1 @@ +{ ... }: { } |