30 lines
651 B
Nix
30 lines
651 B
Nix
{ config, ... }:
|
|
{
|
|
services.nginx = {
|
|
enable = true;
|
|
clientMaxBodySize = "25m";
|
|
user = "netbox";
|
|
virtualHosts."netbox.grzb.de" = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
listen = [
|
|
{
|
|
addr = "0.0.0.0";
|
|
port = 80;
|
|
}
|
|
{
|
|
addr = "0.0.0.0";
|
|
port = 443;
|
|
ssl = true;
|
|
}
|
|
];
|
|
locations."/static/" = {
|
|
alias = "${config.services.netbox.dataDir}/static/";
|
|
};
|
|
locations."/" = {
|
|
proxyPass = "http://${config.services.netbox.listenAddress}:${builtins.toString config.services.netbox.port}";
|
|
};
|
|
};
|
|
};
|
|
}
|