Setup mail server and restructure some things
This commit is contained in:
parent
4c382e629d
commit
ba93d164cf
90 changed files with 512 additions and 66 deletions
29
config/hosts/netbox/nginx.nix
Normal file
29
config/hosts/netbox/nginx.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ 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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue