infrastructure/machines/nixos/compute01/librenms/default.nix
catvayor e4697fc809
All checks were successful
Build all the nodes / netcore02 (push) Successful in 27s
Build all the nodes / netcore01 (push) Successful in 27s
Build all the nodes / Jaccess01 (push) Successful in 29s
Build all the nodes / Jaccess04 (push) Successful in 29s
Run pre-commit on all files / pre-commit (push) Successful in 32s
Build all the nodes / ap01 (push) Successful in 43s
Build all the nodes / geo02 (push) Successful in 54s
Build all the nodes / bridge01 (push) Successful in 55s
Build all the nodes / hypervisor01 (push) Successful in 1m4s
Build all the nodes / hypervisor03 (push) Successful in 1m5s
Build all the nodes / hypervisor02 (push) Successful in 1m5s
Build all the nodes / lab-router01 (push) Successful in 1m3s
Build all the nodes / geo01 (push) Successful in 1m5s
Build all the nodes / build01 (push) Successful in 1m8s
Build all the nodes / cof02 (push) Successful in 1m7s
Build all the nodes / iso (push) Successful in 1m8s
Build all the nodes / rescue01 (push) Successful in 1m20s
Build the shell / build-shell (push) Successful in 32s
Build all the nodes / tower01 (push) Successful in 1m7s
Build all the nodes / web02 (push) Successful in 1m5s
Build all the nodes / compute01 (push) Successful in 1m36s
Build all the nodes / vault01 (push) Successful in 1m13s
Build all the nodes / storage01 (push) Successful in 1m41s
Build all the nodes / krz01 (push) Successful in 1m48s
Build all the nodes / web03 (push) Successful in 1m7s
Build all the nodes / zulip01 (push) Successful in 55s
Build all the nodes / web01 (push) Successful in 1m22s
fix(librenms): allows kanidm to create accounts
2025-06-07 23:19:16 +02:00

55 lines
1.3 KiB
Nix

# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{ config, pkgs, ... }:
let
host = "nms.dgnum.eu";
in
{
imports = [ ./module.nix ];
services.librenms = {
enable = true;
package =
(pkgs.librenms.override { inherit (config.services.librenms) dataDir logDir; }).overrideAttrs
(old: {
patches = (old.patches or [ ]) ++ [ ./kanidm.patch ];
vendorHash = "sha256-J/whSL1keEZKkfOtHpkJ2vSrN/s+DpUGb6RBXpQZQXg=";
});
hostname = host;
settings = {
auth.socialite = {
configs.kanidm = {
listener = "\\SocialiteProviders\\Kanidm\\KanidmExtendSocialite";
client_id = "$KANIDM_CLIENT_ID";
client_secret = "$KANIDM_CLIENT_SECRET";
redirect = "$KANIDM_REDIRECT_URI";
base_url = "$KANIDM_BASE_URL";
};
default_role = "normal";
register = true;
};
};
database = {
createLocally = true;
passwordFile = config.age.secrets."librenms-database_password_file".path;
};
environmentFile = config.age.secrets."librenms-environment_file".path;
nginx = {
serverName = host;
enableACME = true;
forceSSL = true;
};
};
age-secrets.autoMatch = [ "librenms" ];
}