summary refs log tree commit diff
path: root/nixos/modules/programs
diff options
context:
space:
mode:
authorTobias Widmann <widmannt@users.noreply.github.com>2023-08-19 18:13:23 +0200
committerBjørn Forsman <bjorn.forsman@gmail.com>2023-08-20 00:10:24 +0200
commite4a62b0fd1b52a5d5fb0e59a44f642b7a45dfc03 (patch)
tree7feb978a11f936f67441e990f5ba5d403f1a9809 /nixos/modules/programs
parent7c75694db9ddc92bbcc60dc3de8c435eb1185c88 (diff)
downloadnixpkgs-e4a62b0fd1b52a5d5fb0e59a44f642b7a45dfc03.tar
nixpkgs-e4a62b0fd1b52a5d5fb0e59a44f642b7a45dfc03.tar.gz
nixpkgs-e4a62b0fd1b52a5d5fb0e59a44f642b7a45dfc03.tar.bz2
nixpkgs-e4a62b0fd1b52a5d5fb0e59a44f642b7a45dfc03.tar.lz
nixpkgs-e4a62b0fd1b52a5d5fb0e59a44f642b7a45dfc03.tar.xz
nixpkgs-e4a62b0fd1b52a5d5fb0e59a44f642b7a45dfc03.tar.zst
nixpkgs-e4a62b0fd1b52a5d5fb0e59a44f642b7a45dfc03.zip
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.
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r--nixos/modules/programs/htop.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/programs/htop.nix b/nixos/modules/programs/htop.nix
index 2682ced490c..777ea709836 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