anchor.diff:    };
   
     config = mkIf cfg.enable {
  +    assertions = [
  +      {
  +        assertion = ((filterAttrs (n: v: v == "") cfg.keybindings) == {});
  +	message = "To disable a keybinding, use `null` instead of an empty string.";
  +      }
  +    ];
  +
       home.packages = [ pkgs.feh ];
   
  +    xdg.configFile."feh/buttons".text = ''
  +      ${concatStringsSep "\n" (mapAttrsToList disableBinding (filterAttrs (n: v: v == null) cfg.buttons))}
  +      ${concatStringsSep "\n" (mapAttrsToList enableBinding (filterAttrs (n: v: v != null) cfg.buttons))}
  +    '';
  +
       xdg.configFile."feh/keys".text = ''
  -      # Disable default keybindings
  -      ${concatStringsSep "\n" (mapAttrsToList disableBinding cfg.keybindings)}
  -
  -      # Enable new keybindings
  -      ${concatStringsSep "\n" (mapAttrsToList enableBinding cfg.keybindings)}
  +      ${concatStringsSep "\n" (mapAttrsToList disableBinding (filterAttrs (n: v: v == null) cfg.keybindings))}
  +      ${concatStringsSep "\n" (mapAttrsToList enableBinding (filterAttrs (n: v: v != null) cfg.keybindings))}
       '';
     };
   }
  
positive.code:   options.programs.feh = {
      enable = mkEnableOption "feh - a fast and light image viewer";
  
      keybindings = mkOption {
        default = {};
        type = types.attrsOf types.str;
        example = { zoom_in = "plus"; zoom_out = "minus"; };
        description = ''
          Set keybindings.
          See <link xlink:href="https://man.finalrewind.org/1/feh/#x4b455953"/> for
          default bindings and available commands.
        '';
  
negative.code:   cfg = config.programs.feh;
  
    disableBinding = func: key: func;
    enableBinding = func: key: "${func} ${toString key}";
  
  in
  
  