Since "src" is a fetchsvn directory, the source is copied with "cp
--no-preserve=timestamps" (see commit
6d928ab684327e0eeb1bf6cd889d57ca7127e8a7). So some source files might
get a slightly different timestamp. Here, if lib/standard.ppmdfont
gets a newer timestamp than the generated file lib/standardppmdfont.c,
Make will try to rebuild the latter. But that fails because the
ppmdcfont program doesn't exist (yet).
Probably stdenv should ensure that every file has the same timestamp.
Ensure permission bits are (re)set on each system activation with
explicit chmod call.
mkdir -m MODE PATH will only set the permission bits if PATH is
*created*, which means users that have old NixOS versions will continue
to have the old 700 permissions on /var/log/journal until they chmod
manually. With this commit the permissions will be set to 755 on system
activation.
For Linux, the phases was run in the wrong order. I've
fixed that, but the package is still a complete mess that
needs to be cleaned up. The linux and darwin builds should
probably be separated into two different Nix expressions
to avoid the current conditional mess.
When apcupsd has initiated a shutdown, systemd always ends up waiting
for it to stop ("A stop job is running for UPS daemon"). This is weird,
because in the journal one can clearly see that apcupsd has received the
SIGTERM signal and has already quit (or so it seems). This reduces the
wait time from 90 seconds (default) to just 5. Then systemd kills it
with SIGKILL.
This adds a special systemd service that calls "apcupsd --killpower"
(put UPS in hibernate mode) just before shutting down the system.
Without this command, the UPS will stay on until the battery is
completely empty.
Each attribute in this option should name an apcupsd event and the
string value it contains will be executed in a shell in response to that
event. See "man apccontrol" for the list of events and what they
represent.
Now it is easy to hook into the apcupsd event system:
services.apcupsd.hooks = {
onbattery = ''# shell commands to run when the onbattery event is emitted'';
doshutdown = ''# shell commands to notify that the computer is shutting down'';
};
This option allows administrators to add verbatim text to the generated
config file. I use this feature, for instance, to disable the default
route normally added by dhcpcd for certain interfaces.