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