From 6ecc647b4e0cf2e17f9d2a45b64e2a8df06ae516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Tue, 10 Sep 2024 21:29:41 +0200 Subject: [PATCH] nixos/ups: set env vars in the global environment This allows using upsdrvctl interactively, which otherwise tries to use a missing ups.conf in the Nix store, instead of the correct /etc/nut/ups.conf. (cherry picked from commit 1cb392fdcd14fb7a4dbf6ad79b303aaccc682ca7) --- nixos/modules/services/monitoring/ups.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/monitoring/ups.nix b/nixos/modules/services/monitoring/ups.nix index 1d2968b3b485..adc403e66360 100644 --- a/nixos/modules/services/monitoring/ups.nix +++ b/nixos/modules/services/monitoring/ups.nix @@ -501,7 +501,9 @@ in }) ]; + # For interactive use. environment.systemPackages = [ pkgs.nut ]; + environment.variables = envVars; networking.firewall = mkIf cfg.openFirewall { allowedTCPPorts =