2017-01-07 18:16:26 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.taffybar;
|
|
|
|
|
|
|
|
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;
|
|
|
|
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 = {
|
|
|
|
Unit = {
|
|
|
|
Description = "Taffybar desktop bar";
|
2017-06-26 16:34:09 +00:00
|
|
|
After = [ "graphical-session-pre.target" ];
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
2017-01-07 18:16:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
Service = {
|
|
|
|
ExecStart = "${cfg.package}/bin/taffybar";
|
|
|
|
};
|
|
|
|
|
|
|
|
Install = {
|
2017-01-09 21:45:42 +00:00
|
|
|
WantedBy = [ "graphical-session.target" ];
|
2017-01-07 18:16:26 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|