From 1cb392fdcd14fb7a4dbf6ad79b303aaccc682ca7 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. --- 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 8de7812ee203..67b15b520f59 100644 --- a/nixos/modules/services/monitoring/ups.nix +++ b/nixos/modules/services/monitoring/ups.nix @@ -498,7 +498,9 @@ in }) ]; + # For interactive use. environment.systemPackages = [ pkgs.nut ]; + environment.variables = envVars; networking.firewall = lib.mkIf cfg.openFirewall { allowedTCPPorts =