1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-27 08:01:14 +00:00
nixpkgs/modules
Bjørn Forsman 44f1a8d8c7 Add apcupsd service
apcupsd is a daemon for controlling APC UPSes. It is very simple to
configure. If you have an USB based UPS, the default settings should be
useable without further adjustments:

  services.apcupsd.enable = true;

This will give you autodetection of USB UPSes, network access limited to
localhost (for security) and the shutdown sequence will be started when
the system when the battery level is below 50 percent, or when the UPS
has calculated that it has 5 minutes or less of remaining power-on time.

You can provide your own configuration file contents with this option:

  services.apcupsd.configText = "contents of apcupsd.conf";

Bug/annoyance 1: When apcupsd calls "wall" (on powerfail etc. events),
it prints an error message because stdout is not connected to a tty (it
is connected to the journal):

  wall: cannot get tty name: Inappropriate ioctl for device

The message still gets through though, to ctrl-alt-f[1-6] terminals.

Bug/annoyance 2: apcupsd tries to call "mail" (on powerfail etc.
events), and that fails because I'm not passing in any mail program at
the moment (because that would require more configuration options). A
solution to this would be to simply let the user fully configure the
apcupsd event handling logic in nix.
2013-07-17 21:23:09 +02:00
..
config time.timeZone: Set the TZ environment variable, which is used by Java. 2013-06-29 18:43:38 +02:00
hardware Adding support of the Intel 2230 wireless card to nixos 2013-01-30 20:51:49 +01:00
installer nixos-rebuild: Support Nix's --repair flag 2013-07-15 13:54:15 +02:00
misc Add chrony service 2013-05-23 02:07:49 +00:00
profiles Fix the sshd check in the rebuildCD test 2013-07-09 16:12:34 +02:00
programs provide a warning on password options that do not follow the read-from-file convention. 2013-07-02 06:04:34 +02:00
security Merge pull request #173 from wizeman/apparmor-service 2013-05-28 16:46:30 -07:00
services Add apcupsd service 2013-07-17 21:23:09 +02:00
system NFS: Use network-online.target instead of remote-fs-pre.target 2013-07-16 11:55:12 +02:00
tasks NFS: Use network-online.target instead of remote-fs-pre.target 2013-07-16 11:55:12 +02:00
testing Work around "Input/output error" opening /dev/ttyS0 2013-07-16 15:04:32 +02:00
virtualisation Fix the installer tests 2013-07-17 13:01:12 +02:00
module-list.nix Add apcupsd service 2013-07-17 21:23:09 +02:00
rename.nix rename.nix: Remove annoying traces 2013-02-21 14:43:02 -05:00