From 08831a7160beace4c2601f28b92b23b650432c35 Mon Sep 17 00:00:00 2001 From: MithicSpirit Date: Sat, 28 Sep 2024 10:56:57 -0400 Subject: [PATCH] nixos/gamemode: use listsAsDuplicateKeys for settings This allows settings multiple scripts in `.custom.start` and `.custom.end`, as Gamemode reads them back out into a list. This is slightly annoying, as *any* duplicate keys will appear multiple times, while gamemode will only accept the last one for most keys (clobbering previous ones). Ideally, it would be possible to only enable `listsAsDuplicateKeys` for scripts, but this does not seem to be possible in `pkgs.formats.ini`. --- nixos/modules/programs/gamemode.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/programs/gamemode.nix b/nixos/modules/programs/gamemode.nix index 14892f9c6eac..bd3248c1c5a2 100644 --- a/nixos/modules/programs/gamemode.nix +++ b/nixos/modules/programs/gamemode.nix @@ -2,7 +2,7 @@ let cfg = config.programs.gamemode; - settingsFormat = pkgs.formats.ini { }; + settingsFormat = pkgs.formats.ini { listsAsDuplicateKeys = true; }; configFile = settingsFormat.generate "gamemode.ini" cfg.settings; in {