depot/third_party/nixpkgs/nixos/modules/services/hardware/joycond.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

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" ];
};
}