summary refs log tree commit diff
path: root/nixos/tests/yabar.nix
blob: bbc0cf4c7dd7875e50d7e4b5adc86a5b9373b6c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import ./make-test.nix ({ pkgs, lib, ... }:

with lib;

{
  name = "yabar";
  meta = with pkgs.stdenv.lib.maintainers; {
    maintainers = [ ma27 ];
  };

  machine = {
    imports = [ ./common/x11.nix ./common/user-account.nix ];

    services.xserver.displayManager.auto.user = "bob";

    programs.yabar.enable = true;
    programs.yabar.bars = {
      top.indicators.date.exec = "YABAR_DATE";
    };
  };

  testScript = ''
    $machine->start;
    $machine->waitForX;

    # confirm proper startup
    $machine->waitForUnit("yabar.service", "bob");
    $machine->sleep(10);
    $machine->waitForUnit("yabar.service", "bob");

    $machine->screenshot("top_bar");
  '';
})