Compare commits

..

2 commits

Author SHA1 Message Date
7cb3ed8d85
fix(patches): removed upstream patches
Some checks failed
Check workflows / check_workflows (pull_request) Successful in 18s
Check meta / check_meta (pull_request) Successful in 20s
Check meta / check_dns (pull_request) Successful in 20s
Run pre-commit on all files / pre-commit (push) Successful in 24s
Build all the nodes / netcore01 (pull_request) Successful in 39s
Build all the nodes / netaccess01 (pull_request) Successful in 44s
Build all the nodes / ap01 (pull_request) Successful in 48s
Build the shell / build-shell (pull_request) Successful in 23s
Run pre-commit on all files / pre-commit (pull_request) Successful in 25s
Build all the nodes / netcore02 (pull_request) Successful in 2m29s
Build all the nodes / bridge01 (pull_request) Failing after 3m59s
Build all the nodes / web03 (pull_request) Failing after 3m36s
Build all the nodes / hypervisor02 (pull_request) Failing after 4m31s
Build all the nodes / tower01 (pull_request) Failing after 4m20s
Build all the nodes / hypervisor01 (pull_request) Failing after 4m40s
Build all the nodes / hypervisor03 (pull_request) Failing after 4m45s
Build all the nodes / geo02 (pull_request) Failing after 4m49s
Build all the nodes / compute01 (pull_request) Failing after 4m50s
Build all the nodes / web02 (pull_request) Failing after 4m30s
Build all the nodes / build01 (pull_request) Failing after 5m0s
Build all the nodes / rescue01 (pull_request) Successful in 5m13s
Build all the nodes / storage01 (pull_request) Successful in 5m13s
Build all the nodes / geo01 (pull_request) Successful in 5m15s
Build all the nodes / vault01 (pull_request) Successful in 4m55s
Build all the nodes / web01 (pull_request) Successful in 5m34s
2025-03-02 12:24:07 +01:00
HT Chores
edb544acc9 chore(npins): Update nixos-24.11
Some checks failed
Check meta / check_dns (pull_request) Successful in 16s
Check meta / check_meta (pull_request) Successful in 15s
Check workflows / check_workflows (pull_request) Successful in 18s
Build all the nodes / bridge01 (pull_request) Failing after 44s
Build all the nodes / geo01 (pull_request) Failing after 43s
Build all the nodes / ap01 (pull_request) Failing after 1m5s
Build all the nodes / hypervisor02 (pull_request) Failing after 34s
Build all the nodes / build01 (pull_request) Failing after 1m26s
Build all the nodes / hypervisor03 (pull_request) Failing after 52s
Build all the nodes / netcore01 (pull_request) Failing after 36s
Build all the nodes / netcore02 (pull_request) Failing after 31s
Build all the nodes / rescue01 (pull_request) Failing after 30s
Build all the nodes / netaccess01 (pull_request) Failing after 1m23s
Build all the nodes / storage01 (pull_request) Failing after 51s
Build all the nodes / compute01 (pull_request) Failing after 2m48s
Build all the nodes / web01 (pull_request) Failing after 29s
Build all the nodes / vault01 (pull_request) Failing after 46s
Build all the nodes / web03 (pull_request) Failing after 26s
Run pre-commit on all files / pre-commit (pull_request) Successful in 25s
Build the shell / build-shell (pull_request) Successful in 33s
Build all the nodes / tower01 (pull_request) Failing after 1m22s
Build all the nodes / web02 (pull_request) Failing after 57s
Build all the nodes / geo02 (pull_request) Failing after 3m40s
Build all the nodes / hypervisor01 (pull_request) Failing after 4m48s
Run pre-commit on all files / pre-commit (push) Successful in 28s
2025-03-01 12:16:38 +00:00
14 changed files with 7 additions and 210 deletions

View file

@ -28,4 +28,4 @@ if [[ $1 == 'apply' ]]; then
doChecks
fi
exec @colmena@ --nix-option nix-path "" "$@"
exec @colmena@ "$@"

View file

@ -25,7 +25,6 @@ lib.extra.mkConfig {
"kanidm"
"librenms"
"mastodon"
# "netbox"
"nextcloud"
"ollama-proxy"
"outline"

View file

@ -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 = [

View file

@ -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" ];
}

View file

@ -76,7 +76,7 @@ in
database.createLocally = true;
configureRedis = true;
autoUpdateApps.enable = false;
autoUpdateApps.enable = true;
settings = {
overwriteprotocol = "https";

View file

@ -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"

View file

@ -12,7 +12,6 @@ lib.extra.mkConfig {
enabledServices = [
# List of services to enable
"k-radius"
"monitoring"
"networking"
"ups"
"ulogd"

View file

@ -1,9 +0,0 @@
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{
imports = [
./victorialogs.nix
];
}

View file

@ -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 ];
};
}

View file

@ -70,7 +70,6 @@ let
"demarches" # Démarches Normaliennes
"docs" # Outline
"grafana" # Grafana
"netbox-v2" # Netbox
"nms" # LibreNMS
"pads" # Hedgedoc
"pass" # Vaultwarden

View file

@ -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",

View file

@ -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)

View file

@ -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 { };