mirror of
https://github.com/nix-community/home-manager
synced 2024-11-24 20:19:45 +01:00
e6869735d2
M_SHARE is not a valid column on Darwin. It seems that previously htop ignored unknown columns, but the current version does not display all subsequent columns.
32 lines
735 B
Nix
32 lines
735 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
config = {
|
|
programs.htop.enable = true;
|
|
programs.htop.settings = { color_scheme = 6; };
|
|
|
|
test.stubs.htop = { };
|
|
|
|
# Test that the 'fields' key is written in addition to the customized
|
|
# settings or htop won't read the options.
|
|
nmt.script = let
|
|
fields = if pkgs.stdenv.hostPlatform.isDarwin then
|
|
"0 48 17 18 38 39 2 46 47 49 1"
|
|
else
|
|
"0 48 17 18 38 39 40 2 46 47 49 1";
|
|
in ''
|
|
htoprc=home-files/.config/htop/htoprc
|
|
assertFileExists $htoprc
|
|
assertFileContent $htoprc \
|
|
${
|
|
builtins.toFile "htoprc-expected" ''
|
|
color_scheme=6
|
|
fields=${fields}
|
|
''
|
|
}
|
|
'';
|
|
};
|
|
|
|
}
|