feat(netbox): Add qr-codes
All checks were successful
build configuration / build_vault01 (push) Successful in 2m21s
build configuration / build_rescue01 (push) Successful in 2m19s
build configuration / build_web02 (push) Successful in 2m23s
build configuration / build_compute01 (push) Successful in 2m33s
build configuration / build_storage01 (push) Successful in 2m38s
lint / check (push) Successful in 24s
build configuration / build_web01 (push) Successful in 3m17s

This commit is contained in:
sinavir 2024-04-03 19:31:46 +02:00
parent 39d1d2999b
commit 22fb460650
2 changed files with 27 additions and 3 deletions

View file

@ -1,7 +1,7 @@
{ {
config, config,
sources,
lib, lib,
mkNixpkgs,
... ...
}: }:
@ -13,12 +13,20 @@ in
services = { services = {
netbox = { netbox = {
enable = true; enable = true;
package = (import sources.nixos-unstable { }).pkgs.netbox_3_7; package = (mkNixpkgs "nixos-unstable").netbox_3_7;
secretKeyFile = "/dev/null"; secretKeyFile = "/dev/null";
listenAddress = "127.0.0.1"; listenAddress = "127.0.0.1";
plugins = p: [ p.netbox-qrcode ];
settings = { settings = {
ALLOWED_HOSTS = [ "netbox.dgnum.eu" ]; ALLOWED_HOSTS = [ "netbox.dgnum.eu" ];
REMOTE_AUTH_BACKEND = "social_core.backends.open_id_connect.OpenIdConnectAuth"; REMOTE_AUTH_BACKEND = "social_core.backends.open_id_connect.OpenIdConnectAuth";
PLUGINS = [ "netbox_qrcode" ];
PLUGINS_CONFIG = {
netbox_qrcode = {
custom_text = "DGNum. contact@dgnum.eu";
text_location = "down";
};
};
}; };
extraConfig = lib.mkForce '' extraConfig = lib.mkForce ''

View file

@ -16,6 +16,13 @@ in
hash = "sha256-mjeRxtZozgLNzHkCxcTs3xnonNPkmPoaGxawixC9jfo="; hash = "sha256-mjeRxtZozgLNzHkCxcTs3xnonNPkmPoaGxawixC9jfo=";
} }
# netbox qrcode plugin
{
_type = "commit";
sha = "ae4bf4c110378ebacb3989c9533726859cfebbfa";
hash = "sha256-SgHhW9HCkDQsxT3eG4P9q68c43e3sbDHRY9qs7oSt8o=";
}
netboxAgent netboxAgent
# missing jsonargparse deps for netbox-agent # missing jsonargparse deps for netbox-agent
@ -144,5 +151,14 @@ in
hash = "sha256-XVq72jiLCDrZhADgyvI5y1y/5zlpX89vUBvxUolrYp8="; hash = "sha256-XVq72jiLCDrZhADgyvI5y1y/5zlpX89vUBvxUolrYp8=";
} }
]; ];
"nixos-unstable" = [ netboxAgent ]; "nixos-unstable" = [
netboxAgent
# netbox qrcode plugin
{
_type = "commit";
sha = "ae4bf4c110378ebacb3989c9533726859cfebbfa";
hash = "sha256-SgHhW9HCkDQsxT3eG4P9q68c43e3sbDHRY9qs7oSt8o=";
}
];
} }