mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-11 17:54:08 -05:00
working netbox
This commit is contained in:
parent
2333647240
commit
70f02c59df
2 changed files with 17 additions and 5 deletions
|
|
@ -1,19 +1,27 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
sopsFolder = builtins.toString inputs.nix-secrets + "/sops";
|
||||
in {
|
||||
users.users.nginx.extraGroups = ["netbox"];
|
||||
|
||||
sops.secrets."netbox/secret-key" = {};
|
||||
sops.secrets."netbox/secret-key" = {
|
||||
owner = "netbox";
|
||||
sopsFile = "${sopsFolder}/shared.yaml";
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true; # otherwise you will get CSRF error while login
|
||||
virtualHosts."netbox.wanderingcrow.net" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "netbox.wanderingcrow.net";
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "/run/netbox/netbox.sock";
|
||||
proxyPass = "http://${config.services.netbox.listenAddress}:${builtins.toString config.services.netbox.port}";
|
||||
};
|
||||
"/static/" = {alias = "${config.services.netbox.dataDir}/static/";};
|
||||
};
|
||||
|
|
@ -21,8 +29,10 @@
|
|||
};
|
||||
|
||||
services.netbox = {
|
||||
enabled = true;
|
||||
unixSocket = "/run/netbox/netbox.sock";
|
||||
enable = true;
|
||||
package = pkgs.netbox;
|
||||
listenAddress = "0.0.0.0";
|
||||
port = 9099;
|
||||
secretKeyFile = config.sops.secrets."netbox/secret-key".path;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue