Skip to content

Commit

Permalink
fix: Have syncthing-tray wait for graphical environment
Browse files Browse the repository at this point in the history
  • Loading branch information
lpchaim committed Nov 23, 2024
1 parent f835d25 commit f2b2c62
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/home/syncthing/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@
syncthing = args.osConfig.services.syncthing.package;
in
lib.mkIf (args ? osConfig && args.osConfig.services.syncthing.enable) {
home.packages = [pkgs.syncthingtray];
services.syncthing.tray.enable = true;
systemd.user.services.syncthingtray = {
Service.ExecStart = lib.mkForce (pkgs.writeShellScript "syncthingtray-wait" ''
${pkgs.syncthingtray}/bin/syncthingtray --wait
'');
Service.ExecStartPre = pkgs.writeShellScript "setup-syncthingtray" ''
cat <<EOF >> ~/.config/syncthingtray.ini
[General]
Expand Down

0 comments on commit f2b2c62

Please sign in to comment.