summary refs log tree commit diff
path: root/nixos/tests/yabar.nix
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2017-12-12 01:14:00 +0100
committerMaximilian Bosch <maximilian@mbosch.me>2018-01-04 09:58:21 +0100
commitdbc414a8a52acb71dcb7bcc4d0d36e9490433511 (patch)
treecf1f92e4913d396f46ee43d16e656de0b3b6de65 /nixos/tests/yabar.nix
parent814b38541f666febaa5d344eeb512f6ef8b68803 (diff)
downloadnixpkgs-dbc414a8a52acb71dcb7bcc4d0d36e9490433511.tar
nixpkgs-dbc414a8a52acb71dcb7bcc4d0d36e9490433511.tar.gz
nixpkgs-dbc414a8a52acb71dcb7bcc4d0d36e9490433511.tar.bz2
nixpkgs-dbc414a8a52acb71dcb7bcc4d0d36e9490433511.tar.lz
nixpkgs-dbc414a8a52acb71dcb7bcc4d0d36e9490433511.tar.xz
nixpkgs-dbc414a8a52acb71dcb7bcc4d0d36e9490433511.tar.zst
nixpkgs-dbc414a8a52acb71dcb7bcc4d0d36e9490433511.zip
yabar: add module
To make the configuration of `yabar` more pleasant and easier to
validate, a NixOS module will be quite helpful.

An example config could look like this:

```
{
  programs.yabar = {
    enable = true;
    bars.top.indicators.exec = "YA_DATE";
  };
}
```

The module adds a user-controlled systemd service which runs `yabar` after
starting up X.
Diffstat (limited to 'nixos/tests/yabar.nix')
-rw-r--r--nixos/tests/yabar.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/nixos/tests/yabar.nix b/nixos/tests/yabar.nix
new file mode 100644
index 00000000000..40ca91e8064
--- /dev/null
+++ b/nixos/tests/yabar.nix
@@ -0,0 +1,25 @@
+import ./make-test.nix ({ pkgs, lib }:
+
+with lib;
+
+{
+  name = "yabar";
+  meta = with pkgs.stdenv.lib.maintainers; {
+    maintainers = [ ma27 ];
+  };
+
+  nodes.yabar = {
+    imports = [ ./common/x11.nix ./common/user-account.nix ];
+
+    services.xserver.displayManager.auto.user = "bob";
+
+    programs.yabar.enable = true;
+  };
+
+  testScript = ''
+    $yabar->start;
+    $yabar->waitForX;
+
+    $yabar->waitForUnit("yabar.service", "bob");
+  '';
+})