From 9616d81f98032d1ee9bec68ab4b6a8c833add88c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Zavala=20Villag=C3=B3mez?= Date: Mon, 13 Jan 2025 10:20:04 -0500 Subject: [PATCH] mangohud: make `false` values actually disable (#6299) Currently the following, will produce `some_opt=false` in the rendered config: ```nix programs.mangohud.settings = { some_opt = false; }; ``` With the intention being to disable the option, this would be incorrect, as per the following stated at: > Use some_parameter=0 to disable a parameter (only works with on/off > parameters) As such, I changed the rendering to follow this. This will be output instead: `some_opt=0` --- modules/programs/mangohud.nix | 2 +- tests/modules/programs/mangohud/basic-configuration.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/programs/mangohud.nix b/modules/programs/mangohud.nix index a62587a2..035a4744 100644 --- a/modules/programs/mangohud.nix +++ b/modules/programs/mangohud.nix @@ -13,7 +13,7 @@ let int = toString option; float = int; path = int; - bool = "false"; + bool = "0"; # "on/off" opts are disabled with `=0` string = option; list = concatStringsSep "," (lists.forEach option (x: toString x)); }.${builtins.typeOf option}; diff --git a/tests/modules/programs/mangohud/basic-configuration.conf b/tests/modules/programs/mangohud/basic-configuration.conf index 8ded2dbc..87ecec5d 100644 --- a/tests/modules/programs/mangohud/basic-configuration.conf +++ b/tests/modules/programs/mangohud/basic-configuration.conf @@ -6,7 +6,7 @@ cpu_stats cpu_temp cpu_text=CPU fps_limit=30,60 -legacy_layout=false +legacy_layout=0 media_player_name=spotify media_player_order=title,artist,album output_folder=/home/user/Documents/mangohud