1 { config, lib, pkgs, ... }:
3 cfg = config.services.joycond;
6 options.services.joycond = {
7 enable = lib.mkEnableOption "support for Nintendo Pro Controllers and Joycons";
9 package = lib.mkPackageOption pkgs "joycond" { };
12 config = lib.mkIf cfg.enable {
13 environment.systemPackages = [ cfg.package ];
15 services.udev.packages = [ cfg.package ];
17 systemd.packages = [ cfg.package ];
19 # Workaround for https://github.com/NixOS/nixpkgs/issues/81138
20 systemd.services.joycond.wantedBy = [ "multi-user.target" ];