Compare commits

..

2 commits

Author SHA1 Message Date
b39ca8b72a
fix(patches): removed upstream patches
All checks were successful
Check meta / check_dns (pull_request) Successful in 15s
Check workflows / check_workflows (pull_request) Successful in 16s
Check meta / check_meta (pull_request) Successful in 19s
Build all the nodes / netcore02 (pull_request) Successful in 19s
Run pre-commit on all files / pre-commit (push) Successful in 39s
Build all the nodes / netaccess01 (pull_request) Successful in 39s
Build all the nodes / netcore01 (pull_request) Successful in 38s
Build all the nodes / ap01 (pull_request) Successful in 46s
Build all the nodes / rescue01 (pull_request) Successful in 4m35s
Build all the nodes / hypervisor01 (pull_request) Successful in 5m19s
Build all the nodes / bridge01 (pull_request) Successful in 5m22s
Build all the nodes / hypervisor03 (pull_request) Successful in 5m22s
Build all the nodes / web01 (pull_request) Successful in 4m42s
Build all the nodes / geo01 (pull_request) Successful in 5m22s
Build all the nodes / tower01 (pull_request) Successful in 4m49s
Build all the nodes / web02 (pull_request) Successful in 4m36s
Build the shell / build-shell (pull_request) Successful in 22s
Run pre-commit on all files / pre-commit (pull_request) Successful in 25s
Build all the nodes / compute01 (pull_request) Successful in 6m24s
Build all the nodes / web03 (pull_request) Successful in 3m0s
Build all the nodes / geo02 (pull_request) Successful in 18m9s
Build all the nodes / hypervisor02 (pull_request) Successful in 18m11s
Build all the nodes / vault01 (pull_request) Successful in 17m49s
Build all the nodes / storage01 (pull_request) Successful in 20m3s
Build all the nodes / build01 (pull_request) Successful in 1m55s
2025-02-26 14:25:05 +01:00
HT Chores
bf900be306 chore(npins): Update nixos-24.11
Some checks failed
Run pre-commit on all files / pre-commit (push) Successful in 39s
Check meta / check_dns (pull_request) Successful in 21s
Check meta / check_meta (pull_request) Successful in 20s
Check workflows / check_workflows (pull_request) Successful in 20s
Build all the nodes / geo01 (pull_request) Failing after 46s
Build all the nodes / geo02 (pull_request) Failing after 55s
Build all the nodes / netcore01 (pull_request) Failing after 1m1s
Build the shell / build-shell (pull_request) Successful in 22s
Build all the nodes / netaccess01 (pull_request) Failing after 1m13s
Run pre-commit on all files / pre-commit (pull_request) Successful in 23s
Build all the nodes / netcore02 (pull_request) Failing after 1m21s
Build all the nodes / vault01 (pull_request) Failing after 55s
Build all the nodes / rescue01 (pull_request) Failing after 1m42s
Build all the nodes / web02 (pull_request) Failing after 1m14s
Build all the nodes / web01 (pull_request) Failing after 1m25s
Build all the nodes / storage01 (pull_request) Failing after 2m1s
Build all the nodes / tower01 (pull_request) Failing after 2m10s
Build all the nodes / web03 (pull_request) Failing after 1m55s
Build all the nodes / bridge01 (pull_request) Failing after 3m4s
Build all the nodes / hypervisor03 (pull_request) Failing after 2m45s
Build all the nodes / hypervisor02 (pull_request) Failing after 2m55s
Build all the nodes / compute01 (pull_request) Failing after 3m54s
Build all the nodes / hypervisor01 (pull_request) Failing after 4m52s
Build all the nodes / ap01 (pull_request) Failing after 6m15s
Build all the nodes / build01 (pull_request) Failing after 7m11s
2025-02-26 12:16:24 +00:00
14 changed files with 7 additions and 210 deletions

View file

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

View file

@ -144,10 +144,7 @@ in
displayName = "Netbox [Inventory]"; displayName = "Netbox [Inventory]";
enableLegacyCrypto = true; enableLegacyCrypto = true;
originLanding = "https://netbox.dgnum.eu"; originLanding = "https://netbox.dgnum.eu";
originUrl = [ originUrl = "https://netbox.dgnum.eu/oauth/complete/oidc/";
"https://netbox.dgnum.eu/oauth/complete/oidc/"
"https://netbox-v2.dgnum.eu/oauth/complete/oidc/"
];
preferShortUsername = true; preferShortUsername = true;
scopeMaps.grp_active = [ 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; database.createLocally = true;
configureRedis = true; configureRedis = true;
autoUpdateApps.enable = false; autoUpdateApps.enable = true;
settings = { settings = {
overwriteprotocol = "https"; overwriteprotocol = "https";

View file

@ -22,7 +22,6 @@
"librenms-environment_file" "librenms-environment_file"
"mastodon-extra_env_file" "mastodon-extra_env_file"
"mastodon-smtp-password" "mastodon-smtp-password"
"netbox-environment_file"
"nextcloud-adminpass_file" "nextcloud-adminpass_file"
"nextcloud-s3_secret_file" "nextcloud-s3_secret_file"
"outline-oidc_client_secret_file" "outline-oidc_client_secret_file"

View file

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

@ -11,7 +11,7 @@ in
{ {
services.django-apps.sites.gestiocof = { services.django-apps.sites.gestiocof = {
source = "https://git.dgnum.eu/DGNum/gestioCOF"; source = "https://git.dgnum.eu/DGNum/gestioCOF";
branch = "cof-prod"; branch = "cof-staging";
domain = "cof.ens.fr"; domain = "cof.ens.fr";
nginx = { nginx = {

View file

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

View file

@ -68,9 +68,9 @@
"url": "https://git.dgnum.eu/DGNum/dgsi.git" "url": "https://git.dgnum.eu/DGNum/dgsi.git"
}, },
"branch": "main", "branch": "main",
"revision": "5e356f73020cc6d4eb2d2f2ae9fc3db6cc76ad7e", "revision": "07192b14f72ef85a7d25bfab4b4b86418f2a8f14",
"url": null, "url": null,
"hash": "012gp35gan1damn079zdginzinvw191zgph112kxbarq4lrrlq3p" "hash": "0dfzz9rl1xwp5v8fxbsjpcjq3hcbal0z5fcw4pssg4mx00gngp2y"
}, },
"disko": { "disko": {
"type": "GitRelease", "type": "GitRelease",
@ -286,8 +286,8 @@
"nixos-24.11": { "nixos-24.11": {
"type": "Channel", "type": "Channel",
"name": "nixos-24.11", "name": "nixos-24.11",
"url": "https://releases.nixos.org/nixos/24.11/nixos-24.11.713099.67e9c8808988/nixexprs.tar.xz", "url": "https://releases.nixos.org/nixos/24.11/nixos-24.11.714876.5d7db4668d7a/nixexprs.tar.xz",
"hash": "1i9micd4d0wmmfl9s5zqvpssany2v4s1h3l1lc2pipi3asrgxx0n" "hash": "1s23zv69406n43l2l90ibignyippbwcgllj5y51yxnnqmayz3y3g"
}, },
"nixos-generators": { "nixos-generators": {
"type": "Git", "type": "Git",

View file

@ -22,12 +22,6 @@ in
# Crabfit: don't depend on all google-fonts # Crabfit: don't depend on all google-fonts
(local ./nixpkgs/03-crabfit-karla.patch) (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 # pretalx env file option
(local ./nixpkgs/01-pretalx-environment-file.patch) (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 { };