refactor: cleaned up nixos dir

This commit is contained in:
Nick 2025-02-05 20:15:36 -06:00
parent 89814be57c
commit 2000adb56a
77 changed files with 422 additions and 464 deletions

View file

@ -0,0 +1,39 @@
{ flake, ... }:
let
inherit (flake.config.services.instances)
caddy
web
;
domain0 = web.domains.url0;
service = caddy;
in
{
services.caddy = {
enable = true;
virtualHosts = {
"${domain0}" = {
extraConfig = ''
tls /var/lib/acme/${domain0}/fullchain.pem /var/lib/acme/${domain0}/key.pem
encode zstd gzip
'';
};
};
};
users.users.${service.name}.extraGroups = [
"acme"
"nextcloud"
"mastodon"
];
networking = {
firewall = {
allowedTCPPorts = [
service.ports.port0
service.ports.port1
];
};
};
}