<commit_before>{ config, lib, pkgs, ... }:

let
  cfg = config.services.joycond;
  kernelPackages = config.boot.kernelPackages;
in

with lib;

{
  options.services.joycond = {
    enable = mkEnableOption "support for Nintendo Pro Controllers and Joycons";

    package = mkOption {
      type = types.package;
      default = pkgs.joycond;
      defaultText = "pkgs.joycond";
      description = ''
        The joycond package to use.
      '';
    };
  };

  config = mkIf cfg.enable {
    environment.systemPackages = [
      kernelPackages.hid-nintendo
      cfg.package
    ];

    boot.extraModulePackages = [ kernelPackages.hid-nintendo ];
    boot.kernelModules = [ "hid_nintendo" ];<commit_msg>joycond: don't use dkms hid-nintendo on kernel 5.16 or newer<commit_after>{ config, lib, pkgs, ... }:

let
  cfg = config.services.joycond;
  kernelPackages = config.boot.kernelPackages;
in

with lib;

{
  options.services.joycond = {
    enable = mkEnableOption "support for Nintendo Pro Controllers and Joycons";

    package = mkOption {
      type = types.package;
      default = pkgs.joycond;
      defaultText = "pkgs.joycond";
      description = ''
        The joycond package to use.
      '';
    };
  };

  config = mkIf cfg.enable {
    environment.systemPackages = [ cfg.package ];

    boot.extraModulePackages = optional (versionOlder kernelPackages.kernel.version "5.16") kernelPackages.hid-nintendo;
{'fraction_non_alphanumeric': 0.1113460183227625, 'fraction_numerical': 0.004228329809725159, 'mean_word_length': 2.858695652173913, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6877802', 'n_tokens_mistral': 451, 'n_tokens_neox': 445, 'n_words': 102}