nixos/ups: install udev rules for nut
This is necessary to allow the usbhid driver to successfully send commands to the attached UPS. It is possible to work around this by explicitly using setting the user flag (e.g. `upsdrvctl -u root shutdown`), though it is much simpler to install the udev rules rather than patch things further.
This commit is contained in:
parent
7d9956755e
commit
fc004b09e5
2 changed files with 4 additions and 0 deletions
|
@ -590,6 +590,7 @@ in
|
|||
"d /var/lib/nut 700"
|
||||
];
|
||||
|
||||
services.udev.packages = [ pkgs.nut ];
|
||||
|
||||
/*
|
||||
users.users.nut =
|
||||
|
|
|
@ -85,6 +85,9 @@ stdenv.mkDerivation rec {
|
|||
|
||||
# we don't need init.d scripts
|
||||
rm -r $out/share/solaris-init
|
||||
|
||||
# Suspicious/overly broad rule, remove it until we know better
|
||||
rm $out/etc/udev/rules.d/52-nut-ipmipsu.rules
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue