From a28ff3126cb089e25d1938ab320d6dfdc1a30cef Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 9 Mar 2025 21:34:04 +0100 Subject: modules/laminar: support showing a reason in the web interface --- modules/nixos/laminar.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'modules/nixos/laminar.nix') diff --git a/modules/nixos/laminar.nix b/modules/nixos/laminar.nix index 3e50033..64ba208 100644 --- a/modules/nixos/laminar.nix +++ b/modules/nixos/laminar.nix @@ -69,6 +69,13 @@ in description = "Name of the timer."; }; + reason = mkOption { + type = with types; nullOr str; + example = "Nightly build"; + default = null; + description = "optional human-readable string that will be displayed in the web UI as the cause of the build."; + }; + startAt = mkOption { type = with types; either str (listOf str); default = "daily"; @@ -179,6 +186,9 @@ in "/run/wrappers" ] ++ cfg.path; + environment = { + LAMINAR_REASON = job.reason; + }; serviceConfig = { User = cfg.user; Group = cfg.group; -- cgit 1.4.1