mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
6afb255d97
these changes were generated with nixq 0.0.2, by running nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix two mentions of the mdDoc function remain in nixos/, both of which are inside of comments. Since lib.mdDoc is already defined as just id, this commit is a no-op as far as Nix (and the built manual) is concerned.
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.services.supergfxd;
|
|
json = pkgs.formats.json { };
|
|
in
|
|
{
|
|
options = {
|
|
services.supergfxd = {
|
|
enable = lib.mkEnableOption "the supergfxd service";
|
|
|
|
settings = lib.mkOption {
|
|
type = lib.types.nullOr json.type;
|
|
default = null;
|
|
description = ''
|
|
The content of /etc/supergfxd.conf.
|
|
See https://gitlab.com/asus-linux/supergfxctl/#config-options-etcsupergfxdconf.
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
environment.systemPackages = [ pkgs.supergfxctl ];
|
|
|
|
environment.etc."supergfxd.conf" = lib.mkIf (cfg.settings != null) {
|
|
source = json.generate "supergfxd.conf" cfg.settings;
|
|
mode = "0644";
|
|
};
|
|
|
|
services.dbus.enable = true;
|
|
|
|
systemd.packages = [ pkgs.supergfxctl ];
|
|
systemd.services.supergfxd.wantedBy = [ "multi-user.target" ];
|
|
systemd.services.supergfxd.path = [ pkgs.kmod pkgs.pciutils ];
|
|
|
|
services.dbus.packages = [ pkgs.supergfxctl ];
|
|
services.udev.packages = [ pkgs.supergfxctl ];
|
|
};
|
|
|
|
meta.maintainers = pkgs.supergfxctl.meta.maintainers;
|
|
}
|