feat(meta/ntfy-sh): register ntfy-sh password in meta
Some checks failed
Run pre-commit on all files / pre-commit (push) Has been cancelled
Check meta / check_dns (pull_request) Successful in 14s
Check meta / check_meta (pull_request) Successful in 17s
Check workflows / check_workflows (pull_request) Successful in 23s
Build all the nodes / Jaccess04 (pull_request) Successful in 24s
Run pre-commit on all files / pre-commit (pull_request) Successful in 29s
Build all the nodes / Jaccess01 (pull_request) Successful in 29s
Build all the nodes / ap01 (pull_request) Successful in 43s
Build all the nodes / bridge01 (pull_request) Successful in 49s
Build all the nodes / netcore01 (pull_request) Successful in 23s
Build all the nodes / geo01 (pull_request) Successful in 49s
Build all the nodes / geo02 (pull_request) Successful in 56s
Build all the nodes / netcore02 (pull_request) Successful in 22s
Build all the nodes / cof02 (pull_request) Successful in 1m0s
Build all the nodes / hypervisor01 (pull_request) Successful in 59s
Build all the nodes / hypervisor02 (pull_request) Successful in 59s
Build all the nodes / build01 (pull_request) Successful in 1m2s
Build all the nodes / hypervisor03 (pull_request) Successful in 56s
Build all the nodes / lab-router01 (pull_request) Successful in 49s
Build all the nodes / iso (pull_request) Successful in 1m0s
Build all the nodes / compute01 (pull_request) Successful in 1m24s
Build the shell / build-shell (pull_request) Successful in 23s
Build all the nodes / tower01 (pull_request) Successful in 45s
Build all the nodes / web01 (pull_request) Failing after 39s
Build all the nodes / krz01 (pull_request) Successful in 1m31s
Build all the nodes / web02 (pull_request) Successful in 59s
Build all the nodes / vault01 (pull_request) Successful in 1m4s
Build all the nodes / zulip01 (pull_request) Successful in 1m0s
Build all the nodes / rescue01 (pull_request) Successful in 1m19s
Build all the nodes / web03 (pull_request) Successful in 1m2s
Build all the nodes / storage01 (pull_request) Successful in 1m19s

This commit is contained in:
catvayor 2025-05-21 11:34:16 +02:00
parent d079f5dacb
commit 94d09a76ec
Signed by: lbailly
GPG key ID: CE3E645251AC63F3
3 changed files with 32 additions and 9 deletions

View file

@ -2,11 +2,31 @@
#
# SPDX-License-Identifier: EUPL-1.2
{ config, ... }:
{
config,
lib,
meta,
...
}:
let
inherit (lib)
filterAttrs
mapAttrsToList
mapAttrs
;
host = "push.dgnum.eu";
port = 2586;
ntfy-users = mapAttrs (_: member: { hashedPassword = member.ntfy-hashedPassword; }) (
filterAttrs (_: member: member.ntfy-hashedPassword != null) meta.organization.members
);
ntfy-access = mapAttrsToList (name: _: {
topic = "monitoring";
username = name;
permission = "ro";
}) ntfy-users;
in
{
nixpkgs.overlays = [
@ -41,15 +61,9 @@ in
username = "systemd";
permission = "wo";
}
];
users = {
] ++ ntfy-access;
users = ntfy-users // {
"systemd".passwordFile = config.age.secrets."ntfy-sh-systemd_passwd".path;
# TODO: through meta
"catvayor" = {
role = "admin";
hashedPassword = "$2b$05$rDvB8C7OoWoyAgLAeaZBcuptiJulF/BfSYREoPRIZkmAO7hhimvNy";
};
};
};
};

View file

@ -142,6 +142,14 @@ in
'';
};
ntfy-hashedPassword = mkOption {
type = nullOr str;
default = null;
description = ''
Hashed password for ntfy-sh account.
'';
};
# FIXME: Unused
vpnKeys = mkOption {
type = attrsOf vpnKeyType;

View file

@ -42,6 +42,7 @@
builderKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDn3ft6Pmlql8er86nyCVFSQDEY993By+667OmN3ECK9 catvayor@kat-probook"
];
ntfy-hashedPassword = "$2b$05$rDvB8C7OoWoyAgLAeaZBcuptiJulF/BfSYREoPRIZkmAO7hhimvNy";
};
cst1 = {