caddy: sigma

This commit is contained in:
Casper V. Kristensen 2024-04-16 01:49:39 +02:00
parent 6e8309029b
commit ad7db51d8b
4 changed files with 29 additions and 6 deletions

11
hosts/sigma/acme.nix Normal file
View file

@ -0,0 +1,11 @@
{...}: {
security.acme.certs."caspervk.net" = {
domain = "*.caspervk.net";
reloadServices = [
"caddy.service"
];
};
users.groups.acme.members = [
"caddy"
];
}

3
hosts/sigma/caddy.nix Normal file
View file

@ -0,0 +1,3 @@
{secrets, ...}: {
services.caddy.virtualHosts = secrets.sigma.caddy.virtualHosts;
}

View file

@ -3,9 +3,11 @@
../../overlays ../../overlays
../../modules/base ../../modules/base
../../modules/server ../../modules/server
./hardware.nix ./acme.nix
#./borg.nix #./borg.nix TODO!
./caddy.nix
./gitea.nix ./gitea.nix
./hardware.nix
./network.nix ./network.nix
]; ];

View file

@ -132,16 +132,23 @@
allowedUDPPorts = lib.mkForce []; allowedUDPPorts = lib.mkForce [];
allowedTCPPortRanges = lib.mkForce []; allowedTCPPortRanges = lib.mkForce [];
allowedUDPPortRanges = lib.mkForce []; allowedUDPPortRanges = lib.mkForce [];
interfaces = { interfaces = {
"enp5s0" = { "enp5s0" = {
allowedTCPPorts = [22]; allowedTCPPorts = [
22 # SSH
];
}; };
"wg-sigma-public" = { "wg-sigma-public" = {
allowedTCPPorts = [22]; allowedTCPPorts = [
22 # SSH
80 # Caddy
443 # Caddy
];
}; };
"wg-sigma-p2p" = { "wg-sigma-p2p" = {
allowedTCPPorts = [1337]; allowedTCPPorts = [
1337 # random testing (TODO)
];
}; };
}; };
}; };