anchor.diff:            type = types.string;
   
             description = ''
  -            The script to use when locking the computer.
  +            The script to use when automatically locking the computer.
  +          '';
  +        };
  +
  +        nowlocker = mkOption {
  +          default = null;
  +          example = "i3lock -i /path/to/img";
  +          type = types.nullOr types.string;
  +
  +          description = ''
  +            The script to use when manually locking the computer with <command>xautolock -locknow</command>.
             '';
           };
   
  
positive.code:         };
  
          notifier = mkOption {
            default = "notify-send 'Locking in 10 seconds'";
            type = types.string;
  
            description = ''
              Notification script to be used to warn about the pending autolock.
            '';
          };
        };
  
negative.code: 
      config = mkIf cfg.enable {
        environment.systemPackages = with pkgs; [ xautolock ];
        systemd.user.services.xautolock = {
          description = "xautolock service";
          wantedBy = [ "graphical-session.target" ];
          partOf = [ "graphical-session.target" ];
          serviceConfig = with lib; {
            ExecStart = strings.concatStringsSep " " ([
              "${pkgs.xautolock}/bin/xautolock"
              "-noclose"
              "-time ${toString cfg.time}"
              "-locker '${cfg.locker}'"
            ] ++ optionals cfg.enableNotifier [
              "-notify ${toString cfg.notify}"
              "-notifier '${cfg.notifier}'"
            ] ++ optionals (cfg.nowlocker != null) [
              "-nowlocker '${cfg.nowlocker}'"
            ] ++ optionals (cfg.killer != null) [
              "-killer '${cfg.killer}'"
              "-killtime ${toString cfg.killtime}"
            ] ++ cfg.extraOptions);
            Restart = "always";
          };
        };
        assertions = [
          {
            assertion = cfg.enableNotifier -> cfg.notifier != null;
            message = "When enabling the notifier for xautolock, you also need to specify the notify script";
          }
          {
            assertion = cfg.killer != null -> cfg.killtime >= 10;
            message = "killtime has to be at least 10 minutes according to `man xautolock`";
          }
        ];
      };
    }
  