mirror of
https://github.com/nix-community/home-manager
synced 2024-11-17 00:29:45 +01:00
55b71223d4
By using `literalExample` the documentation will show the option default without surrounding quotes.
48 lines
1 KiB
Nix
48 lines
1 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.services.taffybar;
|
|
|
|
in
|
|
|
|
{
|
|
meta.maintainers = [ maintainers.rycee ];
|
|
|
|
options = {
|
|
services.taffybar = {
|
|
enable = mkEnableOption "Taffybar";
|
|
|
|
package = mkOption {
|
|
default = pkgs.taffybar;
|
|
defaultText = literalExample "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" ];
|
|
};
|
|
|
|
Service = {
|
|
ExecStart = "${cfg.package}/bin/taffybar";
|
|
Restart = "on-failure";
|
|
};
|
|
|
|
Install = {
|
|
WantedBy = [ "graphical-session.target" ];
|
|
};
|
|
};
|
|
|
|
xsession.importedVariables = [ "GDK_PIXBUF_MODULE_FILE" ];
|
|
};
|
|
}
|