forked from DGNum/infrastructure
feat(shell): Add pre-commit hooks and reformat the repo
This commit is contained in:
parent
988c44d461
commit
5e3819c9b2
91 changed files with 3772 additions and 2282 deletions
19
external/netbox/default.nix
vendored
19
external/netbox/default.nix
vendored
|
@ -1,4 +1,5 @@
|
|||
{ config, pkgs, ... }: {
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [ ./secrets ];
|
||||
|
||||
services = {
|
||||
|
@ -8,8 +9,7 @@
|
|||
listenAddress = "127.0.0.1";
|
||||
settings = {
|
||||
ALLOWED_HOSTS = [ "netbox.dgnum.sinavir.fr" ];
|
||||
REMOTE_AUTH_BACKEND =
|
||||
"social_core.backends.open_id_connect.OpenIdConnectAuth";
|
||||
REMOTE_AUTH_BACKEND = "social_core.backends.open_id_connect.OpenIdConnectAuth";
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
|
@ -27,12 +27,8 @@
|
|||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
||||
locations."/".proxyPass =
|
||||
"http://${config.services.netbox.listenAddress}:${
|
||||
builtins.toString config.services.netbox.port
|
||||
}";
|
||||
locations."/static/".alias =
|
||||
"${config.services.netbox.dataDir}/static/";
|
||||
locations."/".proxyPass = "http://${config.services.netbox.listenAddress}:${builtins.toString config.services.netbox.port}";
|
||||
locations."/static/".alias = "${config.services.netbox.dataDir}/static/";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -50,5 +46,8 @@
|
|||
};
|
||||
|
||||
users.users.nginx.extraGroups = [ "netbox" ];
|
||||
networking.firewall.allowedTCPPorts = [ 443 80 ];
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
443
|
||||
80
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue