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`.
This commit is contained in:
MithicSpirit 2024-09-28 10:56:57 -04:00
parent a28d979c00
commit 08831a7160
No known key found for this signature in database
GPG Key ID: 0EA043551EBD3C2E

View File

@ -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
{