diff --git a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
index 98fe3513e25..25f984f9378 100644
--- a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
+++ b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
@@ -321,6 +321,14 @@
programs.pantheon-tweaks.
+
+
+ joycond,
+ a service that uses hid-nintendo to provide
+ nintendo joycond pairing and better nintendo switch pro
+ controller support.
+
+
diff --git a/nixos/doc/manual/release-notes/rl-2111.section.md b/nixos/doc/manual/release-notes/rl-2111.section.md
index fef42ec52c9..40a671e3efa 100644
--- a/nixos/doc/manual/release-notes/rl-2111.section.md
+++ b/nixos/doc/manual/release-notes/rl-2111.section.md
@@ -99,6 +99,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- [pantheon-tweaks](https://github.com/pantheon-tweaks/pantheon-tweaks), an unofficial system settings panel for Pantheon. Available as [programs.pantheon-tweaks](#opt-programs.pantheon-tweaks.enable).
+- [joycond](https://github.com/DanielOgorchock/joycond), a service that uses `hid-nintendo` to provide nintendo joycond pairing and better nintendo switch pro controller support.
+
## Backward Incompatibilities {#sec-release-21.11-incompatibilities}
- The `security.wrappers` option now requires to always specify an owner, group and whether the setuid/setgid bit should be set.
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index d24f98efb7d..89cf9c493d6 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -411,6 +411,7 @@
./services/hardware/illum.nix
./services/hardware/interception-tools.nix
./services/hardware/irqbalance.nix
+ ./services/hardware/joycond.nix
./services/hardware/lcd.nix
./services/hardware/lirc.nix
./services/hardware/nvidia-optimus.nix
diff --git a/nixos/modules/services/hardware/joycond.nix b/nixos/modules/services/hardware/joycond.nix
new file mode 100644
index 00000000000..ffef4f8a4e1
--- /dev/null
+++ b/nixos/modules/services/hardware/joycond.nix
@@ -0,0 +1,40 @@
+{ 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" ];
+
+ services.udev.packages = [ cfg.package ];
+
+ systemd.packages = [ cfg.package ];
+
+ # Workaround for https://github.com/NixOS/nixpkgs/issues/81138
+ systemd.services.joycond.wantedBy = [ "multi-user.target" ];
+ };
+}