Add Rupert’s configuration

This commit is contained in:
fruchti 2023-02-26 16:42:49 +01:00
commit 2b4264d32d
31 changed files with 1742 additions and 0 deletions

28
hosts/adguard.nix Normal file
View file

@ -0,0 +1,28 @@
{ config, pkgs, ... }:
{
services.adguardhome = {
enable = true;
};
services.nginx = {
enable = true;
virtualHosts = {
"ad.guard" = {
listenAddresses = [ "0.0.0.0" "[::]" ];
locations."/" = {
proxyPass = "http://localhost:5380";
};
};
};
};
networking.firewall.allowedUDPPorts = [ 53 67 68 ];
# Capabilities for DHCP server
systemd.services.adguardhome.serviceConfig.AmbientCapabilities = [ "CAP_NET_RAW" ];
systemd.services."adguardhome" = {
# requires = ["dhcpcd.service"];
after = ["dhcpcd.service"];
};
}