commit d56979f98426e7bd3ddd0810fe1c2e7e3e18ffbe
parent cfcac46a59f4b234d981beba44d350131c6f67da
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sun, 10 Oct 2021 15:45:19 +0200
parent cfcac46a59f4b234d981beba44d350131c6f67da
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sun, 10 Oct 2021 15:45:19 +0200
programs/mako: systemd-service via home-manager
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/configurations/programs/mako.nix b/configurations/programs/mako.nix @@ -1,18 +1,7 @@ { config, lib, pkgs, ... }: { - systemd.user.services.mako = { - serviceConfig.ExecStart = "${pkgs.mako}/bin/mako"; - restartTriggers = [ - config.home-manager.users.leah.xdg.configFile."mako/config".source - ]; - }; - home-manager.users.leah = { - wayland.windowManager.sway.extraConfig = '' - exec_always 'systemctl --user restart mako' - ''; - programs.mako = { enable = true; @@ -27,5 +16,26 @@ font = "Fira Code 11"; format = "<b>%s</b> <span color=\"#93a1a1\">(%a)</span>\\n%b"; }; + + systemd.user.services.mako = { + Unit = { + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; + }; + + Service = { + ExecStart = "${pkgs.mako}/bin/mako"; + Restart = "always"; + RestartSec = 5; + }; + + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + }; + + wayland.windowManager.sway.extraConfig = '' + exec_always 'systemctl --user restart mako' + ''; }; }