Compare commits

..

5 commits

Author SHA1 Message Date
DGNum [bot]
aca275a49e lon: update nixos-25.05
All checks were successful
Run pre-commit on all files / pre-commit (pull_request) Successful in 37s
Check meta / check_dns (pull_request) Successful in 15s
Check meta / check_meta (pull_request) Successful in 16s
Check workflows / check_workflows (pull_request) Successful in 17s
Build all the nodes / Jaccess01 (pull_request) Successful in 1m31s
Build all the nodes / Jaccess04 (pull_request) Successful in 1m32s
Build all the nodes / ap01 (pull_request) Successful in 1m34s
Build all the nodes / netcore01 (pull_request) Successful in 30s
Build all the nodes / netcore02 (pull_request) Successful in 30s
Build all the nodes / hypervisor02 (pull_request) Successful in 1m7s
Build all the nodes / geo01 (pull_request) Successful in 1m31s
Build all the nodes / hypervisor01 (pull_request) Successful in 1m25s
Build all the nodes / geo02 (pull_request) Successful in 1m31s
Build all the nodes / build01 (pull_request) Successful in 1m42s
Build the shell / build-shell (pull_request) Successful in 27s
Build all the nodes / lab-router01 (pull_request) Successful in 1m10s
Build all the nodes / compute01 (pull_request) Successful in 2m8s
Build all the nodes / hypervisor03 (pull_request) Successful in 1m13s
Build all the nodes / tower01 (pull_request) Successful in 1m10s
Build all the nodes / web02 (pull_request) Successful in 1m12s
Build all the nodes / iso (pull_request) Successful in 1m21s
Build all the nodes / zulip01 (pull_request) Successful in 1m12s
Build all the nodes / web03 (pull_request) Successful in 1m18s
Build all the nodes / rescue01 (pull_request) Successful in 1m27s
Build all the nodes / web01 (pull_request) Successful in 1m26s
Build all the nodes / krz01 (pull_request) Successful in 1m48s
Build all the nodes / bridge01 (pull_request) Successful in 3m13s
Build all the nodes / vault01 (pull_request) Successful in 1m56s
Build all the nodes / cof02 (pull_request) Successful in 3m1s
Build all the nodes / storage01 (pull_request) Successful in 2m59s
88331c17ba434359491e8d5889cce872464052c2
→ 36ab78dab7da2e4e27911007033713bab534187b

Last 50 commits:
  4a9cc5b yaziPlugins.nord: 0-unstable-2025-05-14 -> 0-unstable-2025-05-20
  3a21a5f yaziPlugins.bypass: 25.3.2-unstable-2025-05-11 -> 25.3.2-unstable-2025-05-30
  4a33c1f yaziPlugins.chmod: 25.2.26-unstable-2025-03-02 -> 25.5.28-unstable-2025-05-28
  d8a966d yaziPlugins.duckdb: 25.4.8-unstable-2025-04-28 -> 25.4.8-unstable-2025-05-29
  a34c6ce yaziPlugins.full-border: 25.2.26-unstable-2025-03-11 -> 25.2.26-unstable-2025-05-28
  f001557 yaziPlugins.git: 25.4.4-unstable-2025-04-04 -> 25.5.28-unstable-2025-05-28
  bc9ffd5 yaziPlugins.jump-to-char: 25.2.26-unstable-2025-03-02 -> 25.5.28-unstable-2025-05-28
  44ff8d2 yaziPlugins.lsar: 25.2.26-unstable-2025-03-02 -> 25.5.28-unstable-2025-05-28
  717a2ae yaziPlugins.mactag: 25.4.4-unstable-2025-04-04 -> 25.5.28-unstable-2025-05-28
  553f466 yaziPlugins.mediainfo: 25.4.8-unstable-2025-05-19 -> 25.5.28-unstable-2025-05-30
  4e1a12f yaziPlugins.miller: 0-unstable-2024-08-28 -> 0-unstable-2025-04-17
  f3f3a4c yaziPlugins.mime-ext: 25.4.4-unstable-2025-04-04 -> 25.5.28-unstable-2025-05-28
  75df65c yaziPlugins.mount: 25.2.26-unstable-2025-03-02 -> 25.5.28-unstable-2025-05-28
  f1397d8 yaziPlugins.piper: 25.4.8-unstable-2025-04-21 -> 25.5.28-unstable-2025-05-28
  6fa8d2a yaziPlugins.projects: 0-unstable-2025-05-17 -> 0-unstable-2025-05-29
  207f5c9 yaziPlugins.restore: 25.2.7-unstable-2025-04-24 -> 25.5.28-unstable-2025-05-30
  1ae39ce yaziPlugins.rich-preview: 0-unstable-2025-04-22 -> 0-unstable-2025-05-30
  f71c138 yaziPlugins.rsync: 0-unstable-2025-04-12 -> 0-unstable-2025-04-24
  72cec16 yaziPlugins.smart-enter: 25.2.26-unstable-2025-03-02 -> 25.5.28-unstable-2025-05-28
  f321ed4 yaziPlugins.smart-filter: 25.2.26-unstable-2025-03-02 -> 25.5.28-unstable-2025-05-28
  8cb9c2b yaziPlugins.smart-paste: 0-unstable-2025-04-27 -> 25.5.28-unstable-2025-05-28
  a1c5b3d yaziPlugins.starship: 25.4.8-unstable-2025-04-20 -> 25.4.8-unstable-2025-05-30
  e994d45 yaziPlugins.toggle-pane: 25.2.26-unstable-2025-04-21 -> 25.5.28-unstable-2025-05-28
  4114a89 yaziPlugins.vcs-files: 25.4.8-unstable-2025-04-08 -> 25.5.28-unstable-2025-05-28
  7b13298 update yaziPlugins.yatline to  0-unstable-2025-05-31
  6c2b3c9 yaziPlugins.yatline-githead: init at 0-unstable-2025-05-31
  b7e36fe yaziPlugins.bypass: 25.3.2-unstable-2025-05-30 -> 25.3.2-unstable-2025-06-01
  fe5c759 yaziPlugins.ouch: 0-unstable-2025-04-12 -> 0-unstable-2025-06-01
  790e54e yaziPlugins.restore: 25.5.28-unstable-2025-05-30 -> 25.5.31-unstable-2025-06-05
  c3d5384 yaziPlugins.update: allow updating all in set
  bdf8e91 yaziPlugins.update: allow committing changes
  0f1d346 yaziPlugins.update: cleanup
  bc9494e yaziPlugins: update on 2025-06-06
  f821dc9 yaziPlugins.rsync: update from 0-unstable-2025-04-24 to 0-unstable-2025-06-07
  6aedbbb yaziPlugins: update on 2025-06-11
  2f4d5d6 grafana: 12.0.0+security-01 -> 12.0.1+security-01
  0fcbbed [Backport release-25.05] grafana: 12.0.0+security-01 -> 12.0.1+security-01, fix CVE-2025-3415 (#416372)
  ce48dbc firefly-iii-data-importer: 1.6.1 -> 1.6.3
  7278363 coqPackages.coq-elpi: 2.5.0 -> 2.5.2
  4a56f1f [Backport release-25.05] victoriametrics: 1.118.0 -> 1.119.0 (#415501)
  98d2a5f workflows: use bash shell explicitly
  c539888 workflows/reviewers: fix downloading eval results when undrafting
  169f649 workflows/nixpkgs-vet: remove outdated comment
  6a03633 [25.05] workflows/reviewers: actually ping maintainers when undrafting (#416398)
  c69bf3d workflows: run without condition on changed paths
  d39cc5a workflows/build: build all the basics in a single workflow
  4b21b23 workflows/lint: run all the static lints in same workflow
  e6c1c77 workflows/check: run "checks" in one workflow
  1fd7b8b vivaldi: 7.4.3684.46 -> 7.4.3684.50
  f66ac6c [Backport release-25.05] workflows/check: run "checks" in one workflow (#416406)
2025-06-18 12:57:33 +00:00
DGNum [bot]
7b58d8af01 lon: update nix-modules
Some checks failed
Build all the nodes / web01 (pull_request) Successful in 1m14s
Build all the nodes / krz01 (pull_request) Successful in 4m47s
Build all the nodes / Jaccess04 (push) Successful in 23s
Build all the nodes / Jaccess01 (push) Successful in 26s
Run pre-commit on all files / pre-commit (push) Successful in 29s
Build all the nodes / ap01 (push) Successful in 41s
Build all the nodes / bridge01 (push) Successful in 50s
Build all the nodes / geo01 (push) Successful in 52s
Build all the nodes / cof02 (push) Successful in 55s
Build all the nodes / build01 (push) Successful in 57s
Build all the nodes / geo02 (push) Successful in 49s
Build all the nodes / hypervisor01 (push) Successful in 54s
Build all the nodes / netcore01 (push) Successful in 32s
Build all the nodes / compute01 (push) Successful in 1m34s
Build all the nodes / hypervisor02 (push) Successful in 52s
Build all the nodes / hypervisor03 (push) Successful in 52s
Build all the nodes / netcore02 (push) Successful in 29s
Build all the nodes / lab-router01 (push) Successful in 54s
Build all the nodes / iso (push) Successful in 1m3s
Build all the nodes / tower01 (push) Successful in 45s
Build all the nodes / rescue01 (push) Successful in 1m10s
Build all the nodes / web02 (push) Successful in 52s
Build all the nodes / vault01 (push) Successful in 1m4s
Build all the nodes / web03 (push) Successful in 58s
Build all the nodes / web01 (push) Successful in 1m9s
Build the shell / build-shell (push) Successful in 31s
Build all the nodes / zulip01 (push) Successful in 52s
Build all the nodes / krz01 (push) Successful in 3m53s
Build all the nodes / storage01 (push) Failing after 5m28s
Build all the nodes / storage01 (pull_request) Successful in 1m51s
44ccf96bd73c1bbbbcc849cb0f2e0d1f5f75f934
→ fd4ba193ea3eda529ac27b43b206e9e3618b1975

Last 1 commits:
  fd4ba19 fix(ntfy-sh/acl): use replaceVarsWith
2025-06-17 21:10:02 +02:00
a7def32a75
feat(nimbolus): init a http terraform backend
Some checks failed
Build all the nodes / compute01 (pull_request) Successful in 1m52s
Build all the nodes / storage01 (pull_request) Successful in 1m35s
Build all the nodes / krz01 (pull_request) Successful in 1m51s
Build all the nodes / Jaccess04 (push) Successful in 49s
Build all the nodes / Jaccess01 (push) Successful in 49s
Run pre-commit on all files / pre-commit (push) Successful in 53s
Build all the nodes / ap01 (push) Successful in 1m15s
Build all the nodes / hypervisor01 (push) Successful in 1m23s
Build all the nodes / hypervisor03 (push) Successful in 1m29s
Build all the nodes / cof02 (push) Successful in 1m33s
Build all the nodes / build01 (push) Successful in 1m34s
Build all the nodes / hypervisor02 (push) Successful in 1m33s
Build all the nodes / bridge01 (push) Successful in 1m44s
Build all the nodes / geo01 (push) Successful in 1m44s
Build all the nodes / netcore01 (push) Successful in 31s
Build all the nodes / netcore02 (push) Successful in 34s
Build all the nodes / compute01 (push) Successful in 1m57s
Build the shell / build-shell (push) Successful in 26s
Build all the nodes / geo02 (push) Successful in 2m4s
Build all the nodes / iso (push) Successful in 1m19s
Build all the nodes / lab-router01 (push) Successful in 58s
Build all the nodes / tower01 (push) Successful in 57s
Build all the nodes / web02 (push) Successful in 55s
Build all the nodes / vault01 (push) Successful in 1m9s
Build all the nodes / zulip01 (push) Successful in 58s
Build all the nodes / web03 (push) Successful in 1m2s
Build all the nodes / rescue01 (push) Successful in 1m19s
Build all the nodes / web01 (push) Successful in 1m26s
Build all the nodes / krz01 (push) Successful in 6m19s
Build all the nodes / storage01 (push) Has been cancelled
2025-06-17 17:26:53 +02:00
d6300e6e19 feat(systemd-notify): allow multiple failure scripts
All checks were successful
Build all the nodes / zulip01 (pull_request) Successful in 57s
Build all the nodes / web01 (pull_request) Successful in 1m13s
Build all the nodes / storage01 (pull_request) Successful in 1m38s
Build all the nodes / Jaccess04 (push) Successful in 24s
Build all the nodes / Jaccess01 (push) Successful in 28s
Run pre-commit on all files / pre-commit (push) Successful in 30s
Build all the nodes / ap01 (push) Successful in 43s
Build all the nodes / bridge01 (push) Successful in 48s
Build all the nodes / netcore01 (push) Successful in 25s
Build all the nodes / hypervisor01 (push) Successful in 52s
Build all the nodes / geo01 (push) Successful in 57s
Build all the nodes / cof02 (push) Successful in 1m1s
Build all the nodes / hypervisor03 (push) Successful in 1m0s
Build all the nodes / hypervisor02 (push) Successful in 1m1s
Build all the nodes / geo02 (push) Successful in 1m2s
Build all the nodes / build01 (push) Successful in 1m4s
Build all the nodes / netcore02 (push) Successful in 22s
Build all the nodes / iso (push) Successful in 1m4s
Build all the nodes / lab-router01 (push) Successful in 55s
Build all the nodes / compute01 (push) Successful in 1m20s
Build all the nodes / krz01 (push) Successful in 1m36s
Build all the nodes / tower01 (push) Successful in 47s
Build the shell / build-shell (push) Successful in 21s
Build all the nodes / vault01 (push) Successful in 56s
Build all the nodes / web02 (push) Successful in 51s
Build all the nodes / rescue01 (push) Successful in 1m10s
Build all the nodes / web03 (push) Successful in 54s
Build all the nodes / zulip01 (push) Successful in 46s
Build all the nodes / web01 (push) Successful in 1m8s
Build all the nodes / storage01 (push) Successful in 1m35s
2025-06-17 17:11:56 +02:00
c1afcb7768 refactor(systemd-notify): take it from nix-modules 2025-06-17 17:11:56 +02:00
10 changed files with 216 additions and 20 deletions

12
lon.lock generated
View file

@ -195,10 +195,10 @@
"type": "Git",
"fetchType": "git",
"branch": "dgnum",
"revision": "44ccf96bd73c1bbbbcc849cb0f2e0d1f5f75f934",
"revision": "fd4ba193ea3eda529ac27b43b206e9e3618b1975",
"url": "https://git.hubrecht.ovh/hubrecht/nix-modules",
"hash": "sha256-mkrCWowrCje3/TuAG0eAJplrtlz1hYmusSFn93/Ccok=",
"lastModified": 1749629064,
"hash": "sha256-O/lMCM0qKkd+TBV43Fp9uG3aEbDSc2lI3a5TetNYs0w=",
"lastModified": 1749739595,
"submodules": false
},
"nix-pkgs": {
@ -247,9 +247,9 @@
"owner": "NixOS",
"repo": "nixpkgs",
"branch": "nixos-25.05",
"revision": "6c64dabd3aa85e0c02ef1cdcb6e1213de64baee3",
"url": "https://github.com/NixOS/nixpkgs/archive/6c64dabd3aa85e0c02ef1cdcb6e1213de64baee3.tar.gz",
"hash": "sha256-h/aac1dGLhS3qpaD2aZt25NdKY7b+JT0ZIP2WuGsJMU="
"revision": "36ab78dab7da2e4e27911007033713bab534187b",
"url": "https://github.com/NixOS/nixpkgs/archive/36ab78dab7da2e4e27911007033713bab534187b.tar.gz",
"hash": "sha256-urV51uWH7fVnhIvsZIELIYalMYsyr2FCalvlRTzqWRw="
},
"nixos-unstable": {
"type": "GitHub",

View file

@ -28,6 +28,7 @@ lib.extra.mkConfig {
"mastodon"
# "netbox"
"nextcloud"
"nimbolus"
"ollama-proxy"
"opengist"
"outline"

View file

@ -0,0 +1,43 @@
# SPDX-FileCopyrightText: 2025 Lubin Bailly <lubin@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{
pkgs,
sources,
config,
...
}:
let
host = "nimbolus.dgnum.eu";
port = 9008;
in
{
imports = [ ./module.nix ];
services.nimbolus-tf = {
enable = true;
package = (import sources.kat-pkgs { inherit pkgs; }).nimbolus-tf-backend;
settings = {
LISTEN_ADDR = "127.0.0.1:${toString port}";
STORAGE_BACKEND = "s3";
STORAGE_S3_ENDPOINT = "s3.dgnum.eu";
STORAGE_S3_USE_SSL = "true";
STORAGE_S3_BUCKET = "nimbolus-dgnum";
STORAGE_S3_ACCESS_KEY = "GKefa111701f349de3988f0010";
# TODO: configure openBAO
# AUTH_BASIC_ENABLED = "false";
# AUTH_JWT_OIDC_ISSUER_URL = "https://vault.dgnum.eu/v1/identity/oidc";
};
credentials = {
KMS_KEY_FILE = config.age.secrets."nimbolus-kms_key".path;
STORAGE_S3_SECRET_KEY_FILE = config.age.secrets."nimbolus-s3_secret".path;
};
};
dgn-web.simpleProxies.nimbolus = {
inherit host port;
};
}

View file

@ -0,0 +1,104 @@
# SPDX-FileCopyrightText: 2025 Lubin Bailly <lubin@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{
lib,
config,
sources,
pkgs,
...
}:
let
inherit (lib)
getExe
mapAttrsToList
mkEnableOption
mkIf
mkPackageOption
mkOption
;
inherit (lib.types)
attrsOf
path
str
;
cfg = config.services.nimbolus-tf;
in
{
options.services.nimbolus-tf = {
enable = mkEnableOption "the nimbolus terraform http backend";
package = mkPackageOption (import sources.kat-pkgs { inherit pkgs; }) "nimbolus-tf-backend" {
pkgsText = "kat-pkgs";
};
user = mkOption {
type = str;
description = ''
User used by the nimbolus server.
'';
default = "nimbolus";
};
group = mkOption {
type = str;
description = ''
Group used by the nimbolus server.
'';
default = "nimbolus";
};
settings = mkOption {
type = attrsOf str;
default = { };
description = ''
Environment variables for nimbolus configuration.
'';
};
credentials = mkOption {
type = attrsOf path;
default = { };
description = ''
Files to pass by systemd LoadCredentials.
'';
};
};
config = mkIf cfg.enable {
systemd.services.nimbolus-tf = {
description = "Nimbolus terraform http backend";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = getExe cfg.package;
Environment =
mapAttrsToList (name: value: "${name}=${value}") cfg.settings
++ mapAttrsToList (name: _: "${name}=%d/${name}") cfg.credentials;
LoadCredential = mapAttrsToList (name: file: "${name}:${file}") cfg.credentials;
StateDirectory = "nimbolus-tf";
StateDirectoryMode = "0700";
WorkingDirectory = "/var/lib/nimbolus-tf";
# Hardening
DynamicUser = true;
CapabilityBoundingSet = "";
PrivateDevices = true;
ProtectClock = true;
ProtectKernelLogs = true;
ProtectControlGroups = true;
ProtectKernelModules = true;
RestrictNamespaces = true;
ProtectHostname = true;
LockPersonality = true;
RestrictRealtime = true;
ProtectHome = true;
ProtectProc = "noaccess";
ProcSubset = "pid";
PrivateUsers = true;
UMask = "0077";
ProtectKernelTunables = true;
RestrictAddressFamilies = "AF_INET AF_INET6";
SystemCallFilter = "~@clock @cpu-emulation @debug @module @mount @obsolete @privileged @raw-io @reboot @resources @swap";
MemoryDenyWriteExecute = true;
SystemCallArchitectures = "native";
};
};
};
}

Binary file not shown.

Binary file not shown.

View file

@ -25,6 +25,8 @@
"netbox-environment_file"
"nextcloud-adminpass_file"
"nextcloud-s3_secret_file"
"nimbolus-kms_key"
"nimbolus-s3_secret"
"opengist-environment_file"
"outline-oidc_client_secret_file"
"outline-smtp_password_file"

View file

@ -37,8 +37,9 @@
"dgn-web"
"django-apps"
"extranix"
"openbao"
"forgejo-multiuser-nix-runners"
"openbao"
"systemd-notify"
])
++ [
"${sources.agenix}/modules/age.nix"
@ -52,7 +53,6 @@
"services/forgejo-nix-runners"
"services/nginx-sni"
"services/reaction"
"services/systemd-notify"
"services/victorialogs"
"services/victoriametrics"
]

View file

@ -54,19 +54,16 @@ in
};
services.systemd-notify = {
enable = true;
command = builtins.toString (
pkgs.writeShellScript "sendmail" ''
${pkgs.msmtp}/bin/sendmail -i -t <<ERRMAIL
To: admins+monitoring@dgnum.eu, ${emails}
Subject: [$HOSTNAME] Systemd failure: $1
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8
mail = pkgs.writeShellScript "sendmail" ''
${pkgs.msmtp}/bin/sendmail -i -t <<ERRMAIL
To: admins+monitoring@dgnum.eu, ${emails}
Subject: [$HOSTNAME] Systemd failure: $1
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8
$(systemctl status --full "$1")
ERRMAIL
''
);
$(systemctl status --full "$1")
ERRMAIL
'';
};
age-secrets.sources = [ ./. ];
};

View file

@ -0,0 +1,49 @@
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{ config, lib, ... }:
let
inherit (lib)
getExe
mapAttrs'
mapAttrsToList
mkOption
mkForce
nameValuePair
;
inherit (lib.types) attrsOf package submodule;
cfg = config.services.systemd-notify;
in
{
options.services.systemd-notify = mkOption {
type = attrsOf package;
description = ''
Commands to execute when a systemd unit fails.
Attrs keys will be the unit name and attrs value is the command that
will be run with the name of the failed unit as an argument.
'';
default = { };
};
options.systemd.services = mkOption {
type = attrsOf (submodule {
config.onFailure = mapAttrsToList (name: _: "${name}@%n.service") cfg;
});
};
config.systemd.services = mapAttrs' (
name: script:
nameValuePair "${name}@" {
description = "Run ${name} script on service failures.";
onFailure = mkForce [ ]; # Avoid recursive failures
serviceConfig = {
ExecStart = "${getExe script} %i";
Type = "oneshot";
};
}
) cfg;
}