1 { config, pkgs, lib, ... }:
5 pkg = [ pkgs.switcheroo-control ];
6 cfg = config.services.switcherooControl;
8 options.services.switcherooControl = {
9 enable = mkEnableOption (lib.mdDoc "switcheroo-control, a D-Bus service to check the availability of dual-GPU");
12 config = mkIf cfg.enable {
13 services.dbus.packages = pkg;
14 environment.systemPackages = pkg;
15 systemd.packages = pkg;
16 systemd.targets.multi-user.wants = [ "switcheroo-control.service" ];