mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 02:44:30 +00:00
nixos/supergfxctl: init
This commit is contained in:
parent
dc3ea58abc
commit
8f14c05c50
@ -477,6 +477,7 @@
|
||||
./services/hardware/sane_extra_backends/brscan5.nix
|
||||
./services/hardware/sane_extra_backends/dsseries.nix
|
||||
./services/hardware/spacenavd.nix
|
||||
./services/hardware/supergfxd.nix
|
||||
./services/hardware/tcsd.nix
|
||||
./services/hardware/tlp.nix
|
||||
./services/hardware/thinkfan.nix
|
||||
|
38
nixos/modules/services/hardware/supergfxd.nix
Normal file
38
nixos/modules/services/hardware/supergfxd.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.supergfxd;
|
||||
ini = pkgs.formats.ini { };
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.supergfxd = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "Enable the supergfxd service");
|
||||
|
||||
settings = lib.mkOption {
|
||||
type = lib.types.nullOr ini.type;
|
||||
default = null;
|
||||
description = lib.mdDoc ''
|
||||
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) (ini.generate "supergfxd.conf" cfg.settings);
|
||||
|
||||
services.dbus.enable = true;
|
||||
|
||||
systemd.packages = [ pkgs.supergfxctl ];
|
||||
systemd.services.supergfxd.wantedBy = [ "multi-user.target" ];
|
||||
|
||||
services.dbus.packages = [ pkgs.supergfxctl ];
|
||||
services.udev.packages = [ pkgs.supergfxctl ];
|
||||
};
|
||||
|
||||
meta.maintainers = pkgs.supergfxctl.meta.maintainers;
|
||||
}
|
Loading…
Reference in New Issue
Block a user