anchor.diff:          '';
       };
   
  +  logindHandlerType = types.enum [
  +    "ignore" "poweroff" "reboot" "halt" "kexec" "suspend"
  +    "hibernate" "hybrid-sleep" "lock"
  +  ];
  +
   in
   
   {
  
positive.code:       "systemd/logind.conf".text = ''
          [Login]
          KillUserProcesses=no
          ${config.services.logind.extraConfig}
        '';
  
  
negative.code:       description = ''
          Extra config options for systemd-logind. See man logind.conf for
          available options.
        '';
      };
  
      services.logind.lidSwitch = mkOption {
        default = "suspend";
        example = "ignore";
        type = logindHandlerType;
  
        description = ''
          Specifies what to be done when the laptop lid is closed.
        '';
      };
  
      services.logind.lidSwitchDocked = mkOption {
        default = "ignore";
        example = "suspend";
        type = logindHandlerType;
  
        description = ''
          Specifies what to be done when the laptop lid is closed
          and another screen is added.
        '';
      };
  
  