nixos/ups: sort settings attributes
They're listed twice (documentation and implementation) and this change makes it easier to compare the attrsets.
This commit is contained in:
parent
d952bea4cf
commit
2b90f4cdb3
@ -309,8 +309,8 @@ let
|
||||
defaultText = lib.literalMD ''
|
||||
{
|
||||
MINSUPPLIES = 1;
|
||||
RUN_AS_USER = "root";
|
||||
NOTIFYCMD = "''${pkgs.nut}/bin/upssched";
|
||||
RUN_AS_USER = "root";
|
||||
SHUTDOWNCMD = "''${pkgs.systemd}/bin/shutdown now";
|
||||
}
|
||||
'';
|
||||
@ -330,11 +330,11 @@ let
|
||||
config = {
|
||||
enable = lib.mkDefault (lib.elem cfg.mode [ "standalone" "netserver" "netclient" ]);
|
||||
settings = {
|
||||
RUN_AS_USER = "root"; # TODO: replace 'root' by another username.
|
||||
MINSUPPLIES = lib.mkDefault 1;
|
||||
NOTIFYCMD = lib.mkDefault "${pkgs.nut}/bin/upssched";
|
||||
SHUTDOWNCMD = lib.mkDefault "${pkgs.systemd}/bin/shutdown now";
|
||||
MONITOR = lib.flip lib.mapAttrsToList cfg.upsmon.monitor (name: monitor: with monitor; [ system powerValue user "\"@upsmon_password_${name}@\"" type ]);
|
||||
NOTIFYCMD = lib.mkDefault "${pkgs.nut}/bin/upssched";
|
||||
RUN_AS_USER = "root"; # TODO: replace 'root' by another username.
|
||||
SHUTDOWNCMD = lib.mkDefault "${pkgs.systemd}/bin/shutdown now";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user