1 { config, lib, pkgs, ... }:
4 cfg = config.services.joycond;
10 options.services.joycond = {
11 enable = mkEnableOption (lib.mdDoc "support for Nintendo Pro Controllers and Joycons");
15 default = pkgs.joycond;
16 defaultText = lib.literalExpression "pkgs.joycond";
17 description = lib.mdDoc ''
18 The joycond package to use.
23 config = mkIf cfg.enable {
24 environment.systemPackages = [ cfg.package ];
26 services.udev.packages = [ cfg.package ];
28 systemd.packages = [ cfg.package ];
30 # Workaround for https://github.com/NixOS/nixpkgs/issues/81138
31 systemd.services.joycond.wantedBy = [ "multi-user.target" ];