nixos-configuration/nixosConfigurations/hetzner-vpn2/nginx.nix
Vinzenz Schroeter 417d65062b upgrade to nixos 25.11
- thefuck has been removed, use pay-repects instead
- 'glxinfo' has been renamed to/replaced by 'mesa-demos'
- options have been moved out of the 'xserver' namespace
- use default mesa drivers, remove amdvlk
- systemd global config has been moved and is not string-based anymore
- git settings have been moved to sub-attrset
- ssh default options generate a warning now but are not needed -> disable
- unpin nixpkgs version for servicepoint flakes
2025-12-01 17:30:51 +01:00

59 lines
1.3 KiB
Nix

{ pkgs, ... }:
let
blog-domain-socket = "/run/nginx/blog.sock";
anubis-domain-socket = "/run/anubis/anubis-blog/anubis.sock";
in
{
security.acme = {
acceptTerms = true;
defaults.email = "acme@zerforschen.plus";
};
systemd.services = {
nginx.serviceConfig.SupplementaryGroups = [ "anubis" ];
anubis-main.serviceConfig.SupplementaryGroups = [ "nginx" ];
};
services = {
nginx = {
enable = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
virtualHosts = {
"zerforschen.plus" = {
addSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://unix:" + anubis-domain-socket;
};
};
"blog-in-anubis" = {
root = pkgs.zerforschen-plus-content;
listen = [
{
addr = "unix:" + blog-domain-socket;
}
];
};
};
};
anubis.instances.blog = {
enable = true;
settings = {
BIND = anubis-domain-socket;
TARGET = "unix://" + blog-domain-socket;
};
};
};
networking.firewall.allowedTCPPorts = [
80
443
5201
];
}