504525a148
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
26 lines
570 B
Nix
26 lines
570 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.services.joycond;
|
|
in
|
|
|
|
with lib;
|
|
|
|
{
|
|
options.services.joycond = {
|
|
enable = mkEnableOption (lib.mdDoc "support for Nintendo Pro Controllers and Joycons");
|
|
|
|
package = mkPackageOption pkgs "joycond" { };
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
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" ];
|
|
};
|
|
}
|