Merge pull request #284115 from jacekpoz/ratbagd-module

nixos/ratbagd: add package option
This commit is contained in:
Nick Cao 2024-01-27 11:12:55 -05:00 committed by GitHub
commit 8138e47046
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,6 +11,8 @@ in
options = {
services.ratbagd = {
enable = mkEnableOption (lib.mdDoc "ratbagd for configuring gaming mice");
package = mkPackageOption pkgs "libratbag" { };
};
};
@ -18,10 +20,10 @@ in
config = mkIf cfg.enable {
# Give users access to the "ratbagctl" tool
environment.systemPackages = [ pkgs.libratbag ];
environment.systemPackages = [ cfg.package ];
services.dbus.packages = [ pkgs.libratbag ];
services.dbus.packages = [ cfg.package ];
systemd.packages = [ pkgs.libratbag ];
systemd.packages = [ cfg.package ];
};
}