nixos/asusctl: add package option

This commit is contained in:
jacekpoz 2023-12-21 13:19:29 +01:00 committed by tomf
parent dc4037ea93
commit 86abdfdf87

View File

@ -8,6 +8,8 @@ in
services.asusd = {
enable = lib.mkEnableOption (lib.mdDoc "the asusd service for ASUS ROG laptops");
package = lib.mkPackageOption pkgs "asusctl" { };
enableUserService = lib.mkOption {
type = lib.types.bool;
default = false;
@ -73,7 +75,7 @@ in
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.asusctl ];
environment.systemPackages = [ cfg.package ];
environment.etc =
let
@ -92,9 +94,9 @@ in
};
services.dbus.enable = true;
systemd.packages = [ pkgs.asusctl ];
services.dbus.packages = [ pkgs.asusctl ];
services.udev.packages = [ pkgs.asusctl ];
systemd.packages = [ cfg.package ];
services.dbus.packages = [ cfg.package ];
services.udev.packages = [ cfg.package ];
services.supergfxd.enable = lib.mkDefault true;
systemd.user.services.asusd-user.enable = cfg.enableUserService;