From d8ad1e179431af4e63117d0d38459d0055dfa488 Mon Sep 17 00:00:00 2001 From: atlas Date: Sat, 7 Nov 2026 14:19:52 +0100 Subject: [PATCH] forgejo, bao: let the go process collector read /proc/stat so the uptime panels have data --- nix/host-modules/hive-forge/default.nix | 7 +++++++ nix/host-modules/swarm-bao.nix | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/nix/host-modules/hive-forge/default.nix b/nix/host-modules/hive-forge/default.nix index e3af94e4..e6bab15d 100644 --- a/nix/host-modules/hive-forge/default.nix +++ b/nix/host-modules/hive-forge/default.nix @@ -820,6 +820,13 @@ in "d /var/lib/forgejo/data/actions_artifacts 0750 forgejo forgejo - -" ]; + # The Go process collector derives `process_start_time_seconds` from + # `btime` in /proc/stat and omits the series without a word when the + # file is unreadable. Upstream's unit sets `ProcSubset = "pid"`, + # which hides it, and the Uptime panel reads that series. + # `ProtectProc = "invisible"` stays, so other processes remain hidden. + systemd.services.forgejo.serviceConfig.ProcSubset = lib.mkForce "all"; + # Ensure Forgejo has a usable GPG signing key so UI merges / CRUD # commits are signed instead of erroring "does not have a signing # key". This service (a) generates a key in forgejo's persistent diff --git a/nix/host-modules/swarm-bao.nix b/nix/host-modules/swarm-bao.nix index 66feefb1..d11e9c02 100644 --- a/nix/host-modules/swarm-bao.nix +++ b/nix/host-modules/swarm-bao.nix @@ -4405,6 +4405,12 @@ in # the 60-144 s raft open; `Restart=on-failure` upstream then # restarts it cold. TimeoutStartSec = openbaoStartSec; + # The Go process collector derives `process_start_time_seconds` + # from `btime` in /proc/stat and omits the series without a word + # when the file is unreadable. Upstream's unit sets + # `ProcSubset = "pid"`, which hides it, and the Uptime panel reads + # that series. `ProtectProc = "invisible"` stays. + ProcSubset = lib.mkForce "all"; } // lib.optionalAttrs haveServerTls { LoadCredential = [ "${serverKeyCredential}:${serverKeyPath}" ];