2017-01-07 19:16:26 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.taffybar;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
2017-09-26 23:40:31 +02:00
|
|
|
meta.maintainers = [ maintainers.rycee ];
|
|
|
|
|
2017-01-07 19:16:26 +01:00
|
|
|
options = {
|
|
|
|
services.taffybar = {
|
|
|
|
enable = mkEnableOption "Taffybar";
|
|
|
|
|
|
|
|
package = mkOption {
|
|
|
|
default = pkgs.taffybar;
|
|
|
|
defaultText = "pkgs.taffybar";
|
|
|
|
type = types.package;
|
|
|
|
example = literalExample "pkgs.taffybar";
|
|
|
|
description = "The package to use for the Taffybar binary.";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.services.taffybar.enable {
|
|
|
|
systemd.user.services.taffybar = {
|
2018-09-21 00:51:23 +02:00
|
|
|
Unit = {
|
|
|
|
Description = "Taffybar desktop bar";
|
|
|
|
After = [ "graphical-session-pre.target" ];
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
Service = {
|
|
|
|
ExecStart = "${cfg.package}/bin/taffybar";
|
2019-03-26 18:05:44 +01:00
|
|
|
Restart = "on-failure";
|
2018-09-21 00:51:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
Install = {
|
|
|
|
WantedBy = [ "graphical-session.target" ];
|
|
|
|
};
|
2017-01-07 19:16:26 +01:00
|
|
|
};
|
2019-06-23 14:06:29 +02:00
|
|
|
|
|
|
|
xsession.importedVariables = [ "GDK_PIXBUF_MODULE_FILE" ];
|
2017-01-07 19:16:26 +01:00
|
|
|
};
|
|
|
|
}
|