fork/home-manager

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

Robert Helgessontests: add option `test.stubs`cb09a968

master
1.2 KiB40 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5{
6  config = {
7    programs.xmobar = {
8      enable = true;
9      package = config.lib.test.mkStubPackage { };
10      extraConfig = ''
11        Config
12          { font        = "Fira Code"
13          , borderColor = "#d0d0d0"
14          , border      = FullB
15          , borderWidth = 3
16          , bgColor     = "#222"
17          , fgColor     = "grey"
18          , position    = TopSize C 99 30
19          , commands    =
20              [ Run Cpu ["-t", "cpu: <fc=#4eb4fa><bar> <total>%</fc>"] 10
21              , Run Network "enp3s0" ["-S", "True", "-t", "eth: <fc=#4eb4fa><rx></fc>/<fc=#4eb4fa><tx></fc>"] 10
22              , Run Memory ["-t","mem: <fc=#4eb4fa><usedbar> <usedratio>%</fc>"] 10
23              , Run Date "date: <fc=#4eb4fa>%a %d %b %Y %H:%M:%S </fc>" "date" 10
24              , Run StdinReader
25              ]
26          , sepChar     = "%"
27          , alignSep    = "}{"
28          , template    = "  %StdinReader% | %cpu% | %memory% | %enp3s0%  }{%date%  "
29          }
30      '';
31    };
32
33    nmt.script = ''
34      assertFileExists home-files/.config/xmobar/.xmobarrc
35      assertFileContent \
36        home-files/.config/xmobar/.xmobarrc \
37        ${./basic-configuration.expected}
38    '';
39  };
40}