2017-01-07 18:16:26 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.taffybar;
|
|
|
|
|
2020-02-01 23:39:17 +00:00
|
|
|
in {
|
2017-09-26 21:40:31 +00:00
|
|
|
meta.maintainers = [ maintainers.rycee ];
|
|
|
|
|
2017-01-07 18:16:26 +00:00
|
|
|
options = {
|
|
|
|
services.taffybar = {
|
|
|
|
enable = mkEnableOption "Taffybar";
|
|
|
|
|
|
|
|
package = mkOption {
|
|
|
|
default = pkgs.taffybar;
|
2021-10-09 09:14:08 +00:00
|
|
|
defaultText = literalExpression "pkgs.taffybar";
|
2017-01-07 18:16:26 +00:00
|
|
|
type = types.package;
|
2021-10-09 09:14:08 +00:00
|
|
|
example = literalExpression "pkgs.taffybar";
|
2017-01-07 18:16:26 +00:00
|
|
|
description = "The package to use for the Taffybar binary.";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.services.taffybar.enable {
|
|
|
|
systemd.user.services.taffybar = {
|
2018-09-20 22:51:23 +00:00
|
|
|
Unit = {
|
|
|
|
Description = "Taffybar desktop bar";
|
2021-05-22 02:15:12 +00:00
|
|
|
PartOf = [ "tray.target" ];
|
2018-09-20 22:51:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
Service = {
|
2021-05-22 02:15:12 +00:00
|
|
|
Type = "dbus";
|
|
|
|
BusName = "org.taffybar.Bar";
|
2018-09-20 22:51:23 +00:00
|
|
|
ExecStart = "${cfg.package}/bin/taffybar";
|
2019-03-26 17:05:44 +00:00
|
|
|
Restart = "on-failure";
|
2018-09-20 22:51:23 +00:00
|
|
|
};
|
|
|
|
|
2021-05-22 02:15:12 +00:00
|
|
|
Install = { WantedBy = [ "tray.target" ]; };
|
2017-01-07 18:16:26 +00:00
|
|
|
};
|
2019-06-23 12:06:29 +00:00
|
|
|
|
|
|
|
xsession.importedVariables = [ "GDK_PIXBUF_MODULE_FILE" ];
|
2017-01-07 18:16:26 +00:00
|
|
|
};
|
|
|
|
}
|