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.
This commit is contained in:
@@ -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");
|
||||
'';
|
||||
})
|
||||
Reference in New Issue
Block a user