fix: use individual admins

This commit is contained in:
Jet 2026-03-25 19:26:45 -07:00
parent f9afc7285f
commit 98d5197056
No known key found for this signature in database
3 changed files with 77 additions and 26 deletions

View file

@ -153,13 +153,13 @@
type = "app";
program = "${pkgs.writeShellScript "bootstrap-host" (
builtins.replaceStrings
[ "@ADMIN_KEYS@" ]
[
(lib.concatMapStringsSep "\n" (key: " \"${key}\"") (
lib.flatten (
lib.mapAttrsToList (_: userCfg: userCfg.openssh.authorizedKeys.keys or [ ]) siteConfig.adminUsers
)
))
"@ADMIN_USERS_JSON@"
"@JQ@"
]
[
(builtins.toJSON siteConfig.adminUsers)
"${pkgs.jq}/bin/jq"
]
(builtins.readFile ./scripts/bootstrap-host.sh)
)}";