2021-07-29 12:54:28 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
programs.htop.enable = true;
|
|
|
|
programs.htop.settings = { color_scheme = 6; };
|
|
|
|
|
2021-09-26 09:08:45 +00:00
|
|
|
test.stubs.htop = { };
|
2021-08-16 21:29:49 +00:00
|
|
|
|
2021-07-29 12:54:28 +00:00
|
|
|
# Test that the 'fields' key is written in addition to the customized
|
|
|
|
# settings or htop won't read the options.
|
2022-05-13 20:53:16 +00:00
|
|
|
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 ''
|
2021-07-29 12:54:28 +00:00
|
|
|
htoprc=home-files/.config/htop/htoprc
|
|
|
|
assertFileExists $htoprc
|
|
|
|
assertFileContent $htoprc \
|
|
|
|
${
|
|
|
|
builtins.toFile "htoprc-expected" ''
|
|
|
|
color_scheme=6
|
2022-05-13 20:53:16 +00:00
|
|
|
fields=${fields}
|
2021-07-29 12:54:28 +00:00
|
|
|
''
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|