Skip to content

Commit

Permalink
nixos/ups: set env vars in the global environment
Browse files Browse the repository at this point in the history
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 1cb392f)
  • Loading branch information
bjornfor committed Sep 14, 2024
1 parent 7ea9a39 commit 6ecc647
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nixos/modules/services/monitoring/ups.nix
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,9 @@ in
})
];

# For interactive use.
environment.systemPackages = [ pkgs.nut ];
environment.variables = envVars;

networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts =
Expand Down

0 comments on commit 6ecc647

Please sign in to comment.