fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Roman Timushevhtop: fix darwin defaultse6869735

master
735 B32 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5{
6  config = {
7    programs.htop.enable = true;
8    programs.htop.settings = { color_scheme = 6; };
9
10    test.stubs.htop = { };
11
12    # Test that the 'fields' key is written in addition to the customized
13    # settings or htop won't read the options.
14    nmt.script = let
15      fields = if pkgs.stdenv.hostPlatform.isDarwin then
16        "0 48 17 18 38 39 2 46 47 49 1"
17      else
18        "0 48 17 18 38 39 40 2 46 47 49 1";
19    in ''
20      htoprc=home-files/.config/htop/htoprc
21      assertFileExists $htoprc
22      assertFileContent $htoprc \
23        ${
24          builtins.toFile "htoprc-expected" ''
25            color_scheme=6
26            fields=${fields}
27          ''
28        }
29    '';
30  };
31
32}