3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #205119 from K900/supergfxd-fixup

supergfxd: fix config format
This commit is contained in:
K900 2022-12-08 14:13:58 +03:00 committed by GitHub
commit 4353ba58d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,7 @@
let
cfg = config.services.supergfxd;
ini = pkgs.formats.ini { };
json = pkgs.formats.json { };
in
{
options = {
@ -10,7 +10,7 @@ in
enable = lib.mkEnableOption (lib.mdDoc "Enable the supergfxd service");
settings = lib.mkOption {
type = lib.types.nullOr ini.type;
type = lib.types.nullOr json.type;
default = null;
description = lib.mdDoc ''
The content of /etc/supergfxd.conf.
@ -23,7 +23,7 @@ in
config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.supergfxctl ];
environment.etc."supergfxd.conf" = lib.mkIf (cfg.settings != null) (ini.generate "supergfxd.conf" cfg.settings);
environment.etc."supergfxd.conf".source = lib.mkIf (cfg.settings != null) (json.generate "supergfxd.conf" cfg.settings);
services.dbus.enable = true;