feat(netbox): netbox perso

This commit is contained in:
catvayor 2024-11-02 11:29:00 +01:00
parent 86846bdace
commit ed029daaa4
Signed by: lbailly
GPG key ID: CE3E645251AC63F3

View file

@ -29,6 +29,7 @@
aliases = [ aliases = [
"www.katvayor.net" "www.katvayor.net"
"katvayor.net" "katvayor.net"
"netbox.katvayor.net"
]; ];
ip = "192.168.122.7"; ip = "192.168.122.7";
}; };
@ -68,10 +69,12 @@
security.acme = { security.acme = {
acceptTerms = true; acceptTerms = true;
defaults.email = "root@katvayor.net"; defaults.email = "root@katvayor.net";
certs."website.katvayor.net".extraDomainNames = [ "netbox.katvayor.net" ];
}; };
services = { services = {
openssh.enable = true; openssh.enable = true;
qemuGuest.enable = true; qemuGuest.enable = true;
nginx = { nginx = {
enable = true; enable = true;
virtualHosts = { virtualHosts = {
@ -87,9 +90,29 @@
index = "index.html"; index = "index.html";
}; };
}; };
"netbox.katvayor.net" = {
useACMEHost = "website.katvayor.net";
addSSL = true;
locations = {
"/" = {
recommendedProxySettings = true;
proxyPass = "http://localhost:8001";
};
"/static/".alias = "${config.services.netbox.dataDir}/static/";
};
}; };
}; };
}; };
netbox = {
enable = true;
package = pkgs.netbox_4_1;
listenAddress = "127.0.0.1";
secretKeyFile = "${config.services.netbox.dataDir}/secret.key";
};
};
users.users.nginx.extraGroups = [ "netbox" ];
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }