feat: added prompter

This commit is contained in:
Nick 2025-07-27 15:53:58 -05:00
parent a3719416f3
commit d443dc5953
2 changed files with 11 additions and 17 deletions

View file

@ -9,7 +9,7 @@ in
{
services = {
caddy = {
environmentFile = config.sops.secrets."caddy/prompter-auth".path;
environmentFile = config.sops.secrets."caddy/${service.name}-auth".path;
virtualHosts = {
"${host}" = {
@ -30,23 +30,17 @@ in
sops =
let
sopsPath = secret: {
path = "${service.sops.path0}/${service.name}-${secret}";
owner = "root";
mode = "600";
path = "${service.sops.path0}/${service.name}-${secret}.env";
owner = "caddy";
mode = "0400";
};
in
{
secrets = builtins.listToAttrs (
map
(secret: {
name = "caddy/${secret}";
value = sopsPath secret;
})
[
"${service.name}-auth"
]
);
secrets = {
"caddy/${service.name}-auth" = sopsPath "auth";
};
};
systemd.tmpfiles.rules = [
"Z ${service.paths.path0} 755 caddy caddy -"
"Z ${service.sops.path0} 755 caddy caddy -"