tomat: modify After, PartOf, Environment in service

This allows the tomat service to properly execute hooks, which is a
feature that requires a modifying the PATH and ensuring that the service
is started after the graphical session.
This commit is contained in:
Johan Larsson 2026-01-09 22:55:58 +01:00 committed by Austin Horstman
parent 83e4f9b4d2
commit 4fda26500b
2 changed files with 8 additions and 4 deletions

View file

@ -57,17 +57,19 @@ in
systemd.user.services.tomat = {
Unit = {
Description = "Tomat Pomodoro server";
After = [ "graphical.target" ];
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${lib.getExe cfg.package} daemon run";
Restart = "always";
RestartSec = 5;
Environment = [ "PATH=${config.home.profileDirectory}/bin" ];
};
Install = {
WantedBy = [ "default.target" ];
WantedBy = [ "graphical-session.target" ];
};
};
};

View file

@ -1,11 +1,13 @@
[Install]
WantedBy=default.target
WantedBy=graphical-session.target
[Service]
Environment=PATH=/home/hm-user/.nix-profile/bin
ExecStart=@tomat@/bin/tomat daemon run
Restart=always
RestartSec=5
[Unit]
After=graphical.target
After=graphical-session.target
Description=Tomat Pomodoro server
PartOf=graphical-session.target