mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-08 21:04:38 -05:00
feat: added prompter
This commit is contained in:
parent
a3719416f3
commit
d443dc5953
2 changed files with 11 additions and 17 deletions
|
@ -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 -"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue