From e4a62b0fd1b52a5d5fb0e59a44f642b7a45dfc03 Mon Sep 17 00:00:00 2001 From: Tobias Widmann Date: Sat, 19 Aug 2023 18:13:23 +0200 Subject: nixos/htop: fix boolean values in settings option When generating htoprc, in order to be recognized by htop, a boolean value of 'false' should be written as '0', not an empty string. --- nixos/modules/programs/htop.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nixos') diff --git a/nixos/modules/programs/htop.nix b/nixos/modules/programs/htop.nix index 2682ced490ca3..777ea709836e6 100644 --- a/nixos/modules/programs/htop.nix +++ b/nixos/modules/programs/htop.nix @@ -9,7 +9,8 @@ let fmt = value: if isList value then concatStringsSep " " (map fmt value) else if isString value then value else - if isBool value || isInt value then toString value else + if isBool value then if value then "1" else "0" else + if isInt value then toString value else throw "Unrecognized type ${typeOf value} in htop settings"; in -- cgit 1.4.1