summaryrefslogtreecommitdiff
path: root/hosts/desktop/configuration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/desktop/configuration.nix')
-rw-r--r--hosts/desktop/configuration.nix35
1 files changed, 33 insertions, 2 deletions
diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix
index 82909c2..b334630 100644
--- a/hosts/desktop/configuration.nix
+++ b/hosts/desktop/configuration.nix
@@ -1,8 +1,7 @@
{
config,
username,
- inputs,
- pkgs,
+ pkgs-stable,
...
}:
{
@@ -119,4 +118,36 @@
config.boot.kernelPackages.nct6687d
];
};
+
+ services.netbox = {
+ enable = true;
+ package = pkgs-stable.netbox;
+ secretKeyFile = "/var/lib/netbox/key";
+ apiTokenPeppersFile = "/var/lib/netbox/api-pepper";
+
+ settings = {
+ ALLOWED_HOSTS = [
+ "localhost"
+ "127.0.0.1"
+ "[::1]"
+ ];
+ };
+ };
+
+ networking.firewall.allowedTCPPorts = [ 80 ];
+ services.nginx = {
+ enable = true;
+ user = "netbox";
+ recommendedProxySettings = true;
+ virtualHosts.localhost = {
+ locations = {
+ "/" = {
+ proxyPass = "http://[::1]:8001";
+ };
+ "/static/" = {
+ alias = "${config.services.netbox.dataDir}/static/";
+ };
+ };
+ };
+ };
}