nix: manage waybar with home-manager

This commit is contained in:
leo 2023-06-13 12:58:49 +02:00
parent c4438e063b
commit c8bb94806d
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ
3 changed files with 19 additions and 19 deletions

@ -1,17 +0,0 @@
# ~/.config/systemd/user/waybar.service or /etc/systemd/user/waybar.service
[Unit]
Description=Highly customizable Wayland bar for Sway and Wlroots based compositors.
Documentation=https://github.com/Alexays/Waybar/wiki/
#PartOf=graphical-session.target
PartOf=sway-session.target
After=sway-session.target
[Service]
ExecStart=/usr/bin/waybar
# Upstreamed in https://github.com/Alexays/Waybar/pull/1036
ExecReload=kill -SIGUSR2 $MAINPID
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=sway-session.target

@ -1,2 +0,0 @@
[Service]
Environment=PATH=%h/bin:/usr/local/bin:/usr/bin

@ -83,6 +83,7 @@ in {
bemenu
swayr
kanshi
waybar
];
imports = [
@ -117,6 +118,24 @@ in {
Install = {WantedBy = [config.services.kanshi.systemdTarget];};
};
waybar = {
Unit = {
Description = "Highly customizable Wayland bar for Sway and Wlroots based compositors.";
Documentation = "https://github.com/Alexays/Waybar/wiki/";
PartOf = swayTgt;
After = swayTgt;
};
Service = {
ExecStart = "${pkgs.waybar}/bin/waybar";
ExecReload = "kill -SIGUSR2 $MAINPID";
Restart = "on-failure";
RestartSec = "3s";
};
Install = {WantedBy = [swayTgt];};
};
autotiling = {
Unit = {
Description = "Script for sway and i3 to automatically switch the horizontal / vertical window split orientation";