1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-15 17:50:53 +00:00
home-manager/modules/services/taffybar.nix

45 lines
1,012 B
Nix
Raw Normal View History

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 {
meta.maintainers = [ maintainers.rycee ];
2017-01-07 18:16:26 +00:00
options = {
services.taffybar = {
enable = mkEnableOption "Taffybar";
package = mkOption {
default = pkgs.taffybar;
defaultText = literalExample "pkgs.taffybar";
2017-01-07 18:16:26 +00:00
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-20 22:51:23 +00:00
Unit = {
Description = "Taffybar desktop bar";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${cfg.package}/bin/taffybar";
Restart = "on-failure";
2018-09-20 22:51:23 +00:00
};
2020-02-01 23:39:17 +00:00
Install = { WantedBy = [ "graphical-session.target" ]; };
2017-01-07 18:16:26 +00:00
};
xsession.importedVariables = [ "GDK_PIXBUF_MODULE_FILE" ];
2017-01-07 18:16:26 +00:00
};
}