1 { config, pkgs, lib, ... }:
4 cfg = config.services.switcherooControl;
6 options.services.switcherooControl = {
7 enable = lib.mkEnableOption "switcheroo-control, a D-Bus service to check the availability of dual-GPU";
8 package = lib.mkPackageOption pkgs "switcheroo-control" { };
11 config = lib.mkIf cfg.enable {
12 services.dbus.packages = [ cfg.package ];
13 environment.systemPackages = [ cfg.package ];
15 packages = [ cfg.package ];
16 targets.multi-user.wants = [ "switcheroo-control.service" ];