9 cfg = config.services.supergfxd;
10 json = pkgs.formats.json { };
14 services.supergfxd = {
15 enable = lib.mkEnableOption "the supergfxd service";
17 settings = lib.mkOption {
18 type = lib.types.nullOr json.type;
21 The content of /etc/supergfxd.conf.
22 See https://gitlab.com/asus-linux/supergfxctl/#config-options-etcsupergfxdconf.
28 config = lib.mkIf cfg.enable {
29 environment.systemPackages = [ pkgs.supergfxctl ];
31 environment.etc."supergfxd.conf" = lib.mkIf (cfg.settings != null) {
32 source = json.generate "supergfxd.conf" cfg.settings;
36 services.dbus.enable = true;
38 systemd.packages = [ pkgs.supergfxctl ];
39 systemd.services.supergfxd.wantedBy = [ "multi-user.target" ];
40 systemd.services.supergfxd.path = [
45 services.dbus.packages = [ pkgs.supergfxctl ];
46 services.udev.packages = [ pkgs.supergfxctl ];
49 meta.maintainers = pkgs.supergfxctl.meta.maintainers;