anchor.diff:          '';
         };
   
  +      hooks = mkOption {
  +        default = {};
  +        example = {
  +          doshutdown = ''# shell commands to notify that the computer is shutting down'';
  +        };
  +        type = types.attrsOf types.string;
  +        description = ''
  +          Each attribute in this option names an apcupsd event and the string
  +          value it contains will be executed in a shell, in response to that
  +          event (prior to the default action). See "man apccontrol" for the
  +          list of events and what they represent.
  +
  +          A hook script can stop apccontrol from doing its default action by
  +          exiting with value 99. Do not do this unless you know what you're
  +          doing.
  +        '';
  +      };
  +
       };
   
     };
  
positive.code:   ###### implementation
  
    config = mkIf cfg.enable {
  
      # Give users access to the "apcaccess" tool
      environment.systemPackages = [ pkgs.apcupsd ];
  
negative.code:     # 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.
      systemd.services.apcupsd = {
        description = "UPS daemon";
        wantedBy = [ "multi-user.target" ];
  