mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-11 01:34:08 -05:00
netbox
This commit is contained in:
parent
e897aa26b1
commit
2333647240
1 changed files with 28 additions and 0 deletions
28
modules/services/netbox/default.nix
Normal file
28
modules/services/netbox/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
users.users.nginx.extraGroups = ["netbox"];
|
||||
|
||||
sops.secrets."netbox/secret-key" = {};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true; # otherwise you will get CSRF error while login
|
||||
virtualHosts."netbox.wanderingcrow.net" = {
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "/run/netbox/netbox.sock";
|
||||
};
|
||||
"/static/" = {alias = "${config.services.netbox.dataDir}/static/";};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.netbox = {
|
||||
enabled = true;
|
||||
unixSocket = "/run/netbox/netbox.sock";
|
||||
secretKeyFile = config.sops.secrets."netbox/secret-key".path;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue