mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-08 12:54:38 -05:00
feat: added comfyui to caddy
This commit is contained in:
parent
ca798e7e5d
commit
09a546cf7c
2 changed files with 5 additions and 17 deletions
|
@ -9,11 +9,13 @@ in
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
caddy = {
|
caddy = {
|
||||||
|
environmentFile = config.sops.secrets."caddy/${service.name}-auth".path;
|
||||||
|
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
"${host}" = {
|
"${host}" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
basicauth {
|
basicauth {
|
||||||
import ${config.sops.secrets."caddy/${service.name}-auth".path}
|
{$CADDY_AUTH_USER} {$CADDY_AUTH_PASSWORD_HASH}
|
||||||
}
|
}
|
||||||
root * ${service.paths.path0}
|
root * ${service.paths.path0}
|
||||||
file_server
|
file_server
|
||||||
|
|
|
@ -35,12 +35,11 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
caddy = {
|
caddy = {
|
||||||
|
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
"${host}" = {
|
"${host}" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
basicauth {
|
basicauth {
|
||||||
import ${config.sops.secrets."caddy/${service.name}-auth".path}
|
{$CADDY_AUTH_USER} {$CADDY_AUTH_PASSWORD_HASH}
|
||||||
}
|
}
|
||||||
|
|
||||||
reverse_proxy ${localhost}:${toString service.ports.port0}
|
reverse_proxy ${localhost}:${toString service.ports.port0}
|
||||||
|
@ -52,26 +51,13 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sops =
|
|
||||||
let
|
|
||||||
sopsPath = secret: {
|
|
||||||
path = "${service.sops.path0}/${service.name}-${secret}.env";
|
|
||||||
owner = "caddy";
|
|
||||||
mode = "0400";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
secrets = {
|
|
||||||
"caddy/${service.name}-auth" = sopsPath "auth";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"Z ${service.sops.path0} 755 caddy caddy -"
|
"Z ${service.sops.path0} 755 caddy caddy -"
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users.${service.name}.extraGroups = [
|
users.users.${service.name}.extraGroups = [
|
||||||
"users"
|
"users"
|
||||||
|
"caddy"
|
||||||
];
|
];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue