Compare commits
2 commits
main
...
npins-upda
Author | SHA1 | Date | |
---|---|---|---|
7cb3ed8d85 | |||
|
edb544acc9 |
14 changed files with 7 additions and 210 deletions
|
@ -28,4 +28,4 @@ if [[ $1 == 'apply' ]]; then
|
|||
doChecks
|
||||
fi
|
||||
|
||||
exec @colmena@ --nix-option nix-path "" "$@"
|
||||
exec @colmena@ "$@"
|
||||
|
|
|
@ -25,7 +25,6 @@ lib.extra.mkConfig {
|
|||
"kanidm"
|
||||
"librenms"
|
||||
"mastodon"
|
||||
# "netbox"
|
||||
"nextcloud"
|
||||
"ollama-proxy"
|
||||
"outline"
|
||||
|
|
|
@ -144,10 +144,7 @@ in
|
|||
displayName = "Netbox [Inventory]";
|
||||
enableLegacyCrypto = true;
|
||||
originLanding = "https://netbox.dgnum.eu";
|
||||
originUrl = [
|
||||
"https://netbox.dgnum.eu/oauth/complete/oidc/"
|
||||
"https://netbox-v2.dgnum.eu/oauth/complete/oidc/"
|
||||
];
|
||||
originUrl = "https://netbox.dgnum.eu/oauth/complete/oidc/";
|
||||
preferShortUsername = true;
|
||||
|
||||
scopeMaps.grp_active = [
|
||||
|
|
|
@ -1,74 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2024 Maurice Debray <maurice.debray@dgnum.eu>
|
||||
#
|
||||
# SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
nixpkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
EnvironmentFile = [ config.age.secrets."netbox-environment_file".path ];
|
||||
in
|
||||
|
||||
{
|
||||
services = {
|
||||
netbox = {
|
||||
enable = true;
|
||||
package = nixpkgs.nixos.unstable.netbox_4_1;
|
||||
secretKeyFile = "/dev/null";
|
||||
listenAddress = "127.0.0.1";
|
||||
plugins = p: [ p.netbox-qrcode ];
|
||||
settings = {
|
||||
ALLOWED_HOSTS = [ "netbox-v2.dgnum.eu" ];
|
||||
REMOTE_AUTH_BACKEND = "social_core.backends.open_id_connect.OpenIdConnectAuth";
|
||||
PLUGINS = [ "netbox_qrcode" ];
|
||||
PLUGINS_CONFIG = {
|
||||
netbox_qrcode = {
|
||||
custom_text = "DGNum. contact@dgnum.eu";
|
||||
font = "Tahoma";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = lib.mkForce ''
|
||||
from os import environ as env
|
||||
|
||||
SECRET_KEY = env["SECRET_KEY"]
|
||||
|
||||
SOCIAL_AUTH_OIDC_OIDC_ENDPOINT = env["NETBOX_OIDC_URL"]
|
||||
SOCIAL_AUTH_OIDC_KEY = env["NETBOX_OIDC_KEY"]
|
||||
SOCIAL_AUTH_OIDC_SECRET = env["NETBOX_OIDC_SECRET"]
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
netbox.serviceConfig = {
|
||||
inherit EnvironmentFile;
|
||||
|
||||
TimeoutStartSec = 600;
|
||||
};
|
||||
|
||||
netbox-housekeeping.serviceConfig = {
|
||||
inherit EnvironmentFile;
|
||||
};
|
||||
|
||||
netbox-rq.serviceConfig = {
|
||||
inherit EnvironmentFile;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.nginx.extraGroups = [ "netbox" ];
|
||||
|
||||
dgn-web.simpleProxies.netbox = {
|
||||
inherit (config.services.netbox) port;
|
||||
host = "netbox-v2.dgnum.eu";
|
||||
vhostConfig.locations."/static/".alias = "${config.services.netbox.dataDir}/static/";
|
||||
};
|
||||
|
||||
# dgn-backups.jobs.netbox.settings.paths = [ "/var/lib/netbox" ];
|
||||
# dgn-backups.postgresDatabases = [ "netbox" ];
|
||||
}
|
|
@ -76,7 +76,7 @@ in
|
|||
database.createLocally = true;
|
||||
configureRedis = true;
|
||||
|
||||
autoUpdateApps.enable = false;
|
||||
autoUpdateApps.enable = true;
|
||||
|
||||
settings = {
|
||||
overwriteprotocol = "https";
|
||||
|
|
Binary file not shown.
|
@ -22,7 +22,6 @@
|
|||
"librenms-environment_file"
|
||||
"mastodon-extra_env_file"
|
||||
"mastodon-smtp-password"
|
||||
"netbox-environment_file"
|
||||
"nextcloud-adminpass_file"
|
||||
"nextcloud-s3_secret_file"
|
||||
"outline-oidc_client_secret_file"
|
||||
|
|
|
@ -12,7 +12,6 @@ lib.extra.mkConfig {
|
|||
enabledServices = [
|
||||
# List of services to enable
|
||||
"k-radius"
|
||||
"monitoring"
|
||||
"networking"
|
||||
"ups"
|
||||
"ulogd"
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
|
||||
#
|
||||
# SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
{
|
||||
imports = [
|
||||
./victorialogs.nix
|
||||
];
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
|
||||
#
|
||||
# SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
{ meta, ... }:
|
||||
|
||||
let
|
||||
port = 9428;
|
||||
in
|
||||
|
||||
{
|
||||
services = {
|
||||
nginx = {
|
||||
enable = true;
|
||||
streamConfig = ''
|
||||
server {
|
||||
listen 10.0.253.1:${toString port};
|
||||
listen ${meta.network.vault01.netbirdIp}:${toString port};
|
||||
proxy_pass 127.0.0.1:${toString port};
|
||||
}
|
||||
'';
|
||||
};
|
||||
victorialogs = {
|
||||
enable = true;
|
||||
|
||||
flags = {
|
||||
retentionPeriod = "52w";
|
||||
httpListenAddr = "127.0.0.1:${builtins.toString port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.interfaces = {
|
||||
wt0.allowedTCPPorts = [ port ];
|
||||
vlan-admin-ap.allowedTCPPorts = [ port ];
|
||||
};
|
||||
}
|
|
@ -70,7 +70,6 @@ let
|
|||
"demarches" # Démarches Normaliennes
|
||||
"docs" # Outline
|
||||
"grafana" # Grafana
|
||||
"netbox-v2" # Netbox
|
||||
"nms" # LibreNMS
|
||||
"pads" # Hedgedoc
|
||||
"pass" # Vaultwarden
|
||||
|
|
|
@ -68,9 +68,9 @@
|
|||
"url": "https://git.dgnum.eu/DGNum/dgsi.git"
|
||||
},
|
||||
"branch": "main",
|
||||
"revision": "5e356f73020cc6d4eb2d2f2ae9fc3db6cc76ad7e",
|
||||
"revision": "07192b14f72ef85a7d25bfab4b4b86418f2a8f14",
|
||||
"url": null,
|
||||
"hash": "012gp35gan1damn079zdginzinvw191zgph112kxbarq4lrrlq3p"
|
||||
"hash": "0dfzz9rl1xwp5v8fxbsjpcjq3hcbal0z5fcw4pssg4mx00gngp2y"
|
||||
},
|
||||
"disko": {
|
||||
"type": "GitRelease",
|
||||
|
@ -286,8 +286,8 @@
|
|||
"nixos-24.11": {
|
||||
"type": "Channel",
|
||||
"name": "nixos-24.11",
|
||||
"url": "https://releases.nixos.org/nixos/24.11/nixos-24.11.713099.67e9c8808988/nixexprs.tar.xz",
|
||||
"hash": "1i9micd4d0wmmfl9s5zqvpssany2v4s1h3l1lc2pipi3asrgxx0n"
|
||||
"url": "https://releases.nixos.org/nixos/24.11/nixos-24.11.715026.b27ba4eb322d/nixexprs.tar.xz",
|
||||
"hash": "1k2xs48pz3xp29agilsn83i0zfyw2inji3dx1a48sw39vzalq3xz"
|
||||
},
|
||||
"nixos-generators": {
|
||||
"type": "Git",
|
||||
|
|
|
@ -22,12 +22,6 @@ in
|
|||
# Crabfit: don't depend on all google-fonts
|
||||
(local ./nixpkgs/03-crabfit-karla.patch)
|
||||
|
||||
# netbox qrcode plugin
|
||||
(local ./nixpkgs/06-netbox-qrcode.patch)
|
||||
|
||||
# Fix pretix tests
|
||||
(npr 374822 "sha256-vM6l8Pb6F5HoZrpG4Ay3DdwwHBbv8MQy2Bo4gfiQ5zM=")
|
||||
|
||||
# pretalx env file option
|
||||
(local ./nixpkgs/01-pretalx-environment-file.patch)
|
||||
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
diff --git a/pkgs/development/python-modules/netbox-qrcode/default.nix b/pkgs/development/python-modules/netbox-qrcode/default.nix
|
||||
new file mode 100644
|
||||
index 000000000000..b378b839a8dc
|
||||
--- /dev/null
|
||||
+++ b/pkgs/development/python-modules/netbox-qrcode/default.nix
|
||||
@@ -0,0 +1,51 @@
|
||||
+{ lib
|
||||
+, buildPythonPackage
|
||||
+, fetchFromGitHub
|
||||
+, setuptools
|
||||
+, wheel
|
||||
+, pillow
|
||||
+, qrcode
|
||||
+, netbox
|
||||
+}:
|
||||
+
|
||||
+buildPythonPackage rec {
|
||||
+ pname = "netbox-qrcode";
|
||||
+ version = "0.0.13";
|
||||
+ pyproject = true;
|
||||
+
|
||||
+ src = fetchFromGitHub {
|
||||
+ owner = "netbox-community";
|
||||
+ repo = "netbox-qrcode";
|
||||
+ rev = "v${version}";
|
||||
+ hash = "sha256-/labSZyB1SkU/uemuL946RDk8IVEAgCYJY2vrJFney0=";
|
||||
+ };
|
||||
+
|
||||
+ nativeBuildInputs = [
|
||||
+ setuptools
|
||||
+ wheel
|
||||
+ ];
|
||||
+
|
||||
+ propagatedBuildInputs = [
|
||||
+ qrcode
|
||||
+ pillow
|
||||
+ ];
|
||||
+
|
||||
+ checkInputs = [
|
||||
+ netbox
|
||||
+ ];
|
||||
+
|
||||
+ preFixup = ''
|
||||
+ export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH
|
||||
+ '';
|
||||
+
|
||||
+ pythonImportsCheck = [
|
||||
+ "netbox_qrcode"
|
||||
+ ];
|
||||
+
|
||||
+ meta = with lib; {
|
||||
+ description = "NetBox Plugin for generate QR Codes";
|
||||
+ homepage = "https://github.com/netbox-community/netbox-qrcode";
|
||||
+ license = licenses.asl20;
|
||||
+ maintainers = with maintainers; [ sinavir ];
|
||||
+ };
|
||||
+}
|
||||
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
|
||||
index 9999d745e3ac..b226e0063672 100644
|
||||
--- a/pkgs/top-level/python-packages.nix
|
||||
+++ b/pkgs/top-level/python-packages.nix
|
||||
@@ -8989,6 +8989,8 @@ self: super: with self; {
|
||||
|
||||
netbox-reorder-rack = callPackage ../development/python-modules/netbox-reorder-rack { };
|
||||
|
||||
+ netbox-qrcode = callPackage ../development/python-modules/netbox-qrcode { };
|
||||
+
|
||||
netcdf4 = callPackage ../development/python-modules/netcdf4 { };
|
||||
|
||||
netdata = callPackage ../development/python-modules/netdata { };
|
Loading…
Add table
Reference in a new issue