mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
42 lines
775 B
Nix
42 lines
775 B
Nix
|
{ config, lib, pkgs, ... }:
|
||
|
|
||
|
with lib;
|
||
|
|
||
|
let
|
||
|
|
||
|
cfg = config.services.taffybar;
|
||
|
|
||
|
in
|
||
|
|
||
|
{
|
||
|
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";
|
||
|
};
|
||
|
|
||
|
Service = {
|
||
|
ExecStart = "${cfg.package}/bin/taffybar";
|
||
|
};
|
||
|
|
||
|
Install = {
|
||
|
WantedBy = [ "xorg.target" ];
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|