mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-10 13:54:38 -05:00
feat: init
This commit is contained in:
commit
c19ea940bd
320 changed files with 23845 additions and 0 deletions
28
nixos/modules/services/caddy.nix
Executable file
28
nixos/modules/services/caddy.nix
Executable file
|
@ -0,0 +1,28 @@
|
|||
{flake, ...}: let
|
||||
inherit (flake.config.people) user0;
|
||||
inherit (flake.config.people.user.${user0}) domain;
|
||||
inherit (flake.config.service.instance.caddy) ports;
|
||||
in {
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
"${domain.url0}" = {
|
||||
extraConfig = ''
|
||||
tls /var/lib/acme/${domain.url0}/fullchain.pem /var/lib/acme/${domain.url0}/key.pem
|
||||
encode zstd gzip
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
users.users.caddy.extraGroups = ["acme" "nextcloud" "mastodon"];
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedTCPPorts = [
|
||||
ports.port0
|
||||
ports.port1
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue