mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 10:05:13 -05:00
refactor: cleaned up nixos dir
This commit is contained in:
parent
89814be57c
commit
2000adb56a
77 changed files with 422 additions and 464 deletions
39
nixos/modules/services/caddy/default.nix
Executable file
39
nixos/modules/services/caddy/default.nix
Executable 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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue