From baf1cf5664b481de17849c97dc683fa81ade1c2e Mon Sep 17 00:00:00 2001 From: adikro Date: Sat, 9 May 2026 21:06:23 +0200 Subject: laptop sync --- hosts/desktop/configuration.nix | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'hosts/desktop/configuration.nix') 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/"; + }; + }; + }; + }; } -- cgit v1.3