Compare commits
2 commits
main
...
npins-upda
Author | SHA1 | Date | |
---|---|---|---|
b39ca8b72a | |||
|
bf900be306 |
14 changed files with 7 additions and 210 deletions
|
@ -25,7 +25,6 @@ lib.extra.mkConfig {
|
||||||
"kanidm"
|
"kanidm"
|
||||||
"librenms"
|
"librenms"
|
||||||
"mastodon"
|
"mastodon"
|
||||||
# "netbox"
|
|
||||||
"nextcloud"
|
"nextcloud"
|
||||||
"ollama-proxy"
|
"ollama-proxy"
|
||||||
"outline"
|
"outline"
|
||||||
|
|
|
@ -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 = [
|
||||||
|
|
|
@ -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;
|
database.createLocally = true;
|
||||||
configureRedis = true;
|
configureRedis = true;
|
||||||
|
|
||||||
autoUpdateApps.enable = false;
|
autoUpdateApps.enable = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
overwriteprotocol = "https";
|
overwriteprotocol = "https";
|
||||||
|
|
Binary file not shown.
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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 ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -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