1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-26 19:16:47 +03:00
nixpkgs/nixos/modules/services/hardware/ratbagd.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
533 B
Nix
Raw Normal View History

{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.ratbagd;
in
{
###### interface
options = {
services.ratbagd = {
enable = lib.mkEnableOption "ratbagd for configuring gaming mice";
2024-01-26 22:58:44 +01:00
package = lib.mkPackageOption pkgs "libratbag" { };
};
};
###### implementation
config = lib.mkIf cfg.enable {
# Give users access to the "ratbagctl" tool
2024-01-26 22:58:44 +01:00
environment.systemPackages = [ cfg.package ];
2024-01-26 22:58:44 +01:00
services.dbus.packages = [ cfg.package ];
2024-01-26 22:58:44 +01:00
systemd.packages = [ cfg.package ];
};
}