anchor.diff:          '';
       };
   
  +  muteEvent = {
  +    name = "mute";
  +    event = "button/mute.*";
  +    action = ''
  +      #! ${pkgs.bash}/bin/sh
  +      ${config.services.acpid.muteCommands}
  +    '';
  +  };
  +
  +  volumeDownEvent = {
  +    name = "volume-down";
  +    event = "button/volumedown.*";
  +    action = ''
  +      #! ${pkgs.bash}/bin/sh
  +      ${config.services.acpid.volumeDownEventCommands}
  +    '';
  +  };
  +
  +  volumeUpEvent = {
  +    name = "volume-up";
  +    event = "button/volumeup.*";
  +    action = ''
  +      #! ${pkgs.bash}/bin/sh
  +      ${config.services.acpid.volumeUpEventCommands}
  +    '';
  +  };
  +
  +  cdPlayEvent = {
  +    name = "cd-play";
  +    event = "cd/play.*";
  +    action = ''
  +      #! ${pkgs.bash}/bin/sh
  +      ${config.services.acpid.cdPlayEventCommands}
  +    '';
  +  };
  +
  +  cdNextEvent = {
  +    name = "cd-next";
  +    event = "cd/next.*";
  +    action = ''
  +      #! ${pkgs.bash}/bin/sh
  +      ${config.services.acpid.cdNextEventCommands}
  +    '';
  +  };
  +
  +  cdPrevEvent = {
  +    name = "cd-prev";
  +    event = "cd/prev.*";
  +    action = ''
  +      #! ${pkgs.bash}/bin/sh
  +      ${config.services.acpid.cdPrevEventCommands}
  +    '';
  +  };
  +
  +
   in
   
   {
  
positive.code:       }
      '';
  
    events = [powerEvent lidEvent acEvent];
  
    # Called when the power button is pressed.
    powerEvent =
  
negative.code:         description = "Shell commands to execute on an ac_adapter.* event.";
        };
  
        muteCommands = mkOption {
          type = types.lines;
          default = "";
          description = "Shell commands to execute on an button/mute.* event.";
        };
  
        volumeDownEventCommands = mkOption {
          type = types.lines;
          default = "";
          description = "Shell commands to execute on an button/volumedown.* event.";
        };
  
        volumeUpEventCommands = mkOption {
          type = types.lines;
          default = "";
          description = "Shell commands to execute on an button/volumeup.* event.";
        };
  
        cdPlayEventCommands = mkOption {
          type = types.lines;
          default = "";
          description = "Shell commands to execute on an cd/play.* event.";
        };
  
        cdNextEventCommands = mkOption {
          type = types.lines;
          default = "";
          description = "Shell commands to execute on an cd/next.* event.";
        };
  
        cdPrevEventCommands = mkOption {
          type = types.lines;
          default = "";
          description = "Shell commands to execute on an cd/prev.* event.";
        };
  
      };
  
    };
  