This commit is contained in:
TheWanderingCrow 2025-08-12 10:38:23 -04:00
parent e897aa26b1
commit 2333647240

View file

@ -0,0 +1,28 @@
{
config,
pkgs,
...
}: {
users.users.nginx.extraGroups = ["netbox"];
sops.secrets."netbox/secret-key" = {};
services.nginx = {
enable = true;
recommendedProxySettings = true; # otherwise you will get CSRF error while login
virtualHosts."netbox.wanderingcrow.net" = {
locations = {
"/" = {
proxyPass = "/run/netbox/netbox.sock";
};
"/static/" = {alias = "${config.services.netbox.dataDir}/static/";};
};
};
};
services.netbox = {
enabled = true;
unixSocket = "/run/netbox/netbox.sock";
secretKeyFile = config.sops.secrets."netbox/secret-key".path;
};
}