1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-05 02:39:45 +01:00
home-manager/modules/services/taffybar.nix

46 lines
938 B
Nix
Raw Normal View History

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