really loving clan!

This commit is contained in:
Chris Kruining 2026-04-02 17:24:18 +02:00
parent a8a639db6e
commit d60d4badf3
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
15 changed files with 474 additions and 81 deletions

View file

@ -4,6 +4,7 @@
lib,
pkgs,
settings,
database,
...
}: let
inherit (lib) mkIf;
@ -51,7 +52,7 @@
in
{
enable = true;
openFirewall = true;
# openFirewall = true;
environmentFiles = [
config.clan.core.vars.generators.${service}.files."config.env".path
@ -61,14 +62,14 @@
auth.authenticationMethod = "External";
server = {
bindaddress = "0.0.0.0";
bindaddress = "[::1]";
port = options.port;
};
# Password provided via environment file
postgres = {
host = settings.database.host;
port = toString settings.database.port;
host = database.host;
port = toString database.port;
user = service;
maindb = service;
logdb = service;
@ -322,6 +323,10 @@ in {
clan.core.vars.generators.${service} = createGenerator (args // {inherit service options;});
services.${service} = createService (args // {inherit service options;});
# services.caddy.virtualHosts."${service}.ulmo.arda".extraConfig = ''
# reverse_proxy http://[::1]:${toString options.port}
# '';
systemd.services."${service}-apply-infra" = lib.mkIf settings.enable (createSystemdService (args // {inherit service options;}));
})
|> lib.mkMerge;