here’s what i got in configuration.nix
systemd.services.syncthingSession = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
description = "syncthing"
serviceConfig = {
Type = "notify";
NotifyAccess = "all";
User = "user";
ExecStart = ''${pkgs.syncthing}/bin/syncthing -no-browser'';
ExecStop = ''${pkgs.syncthing}/bin/syncthing -terminate'';
};
};
error when i rebuild:
× syncthingSession.service - start syncthing instance.
Loaded: loaded (/etc/systemd/system/syncthingSession.service; enabled; preset: enabled)
Active: failed (Result: timeout) since Fri 2024-06-07 15:55:50 EDT; 77ms ago
Process: 20012 ExecStart=/nix/store/npav1bljfakbpyham1zj7d5g724nqi9f-syncthing-1.27.7/bin/syncthing -no-browser (code=exited, status=0/SUCCESS)
Main PID: 20012 (code=exited, status=0/SUCCESS)
IP: 52.9K in, 84.8K out
CPU: 1.533s
Jun 07 15:55:40 began-fruit systemd[1]: syncthingSession.service: start operation timed out. Terminating.
Jun 07 15:55:40 began-fruit syncthing[20012]: [monitor] 2024/06/07 15:55:40 INFO: Signal 15 received; exiting
Jun 07 15:55:40 began-fruit syncthing[20012]: [34EQC] 2024/06/07 15:55:40 INFO: Relay listener (dynamic+https://relays.syncthing.net/endpoint) shutting down
Jun 07 15:55:40 began-fruit syncthing[20012]: [34EQC] 2024/06/07 15:55:40 INFO: QUIC listener ([::]:22000) shutting down
Jun 07 15:55:40 began-fruit syncthing[20012]: [34EQC] 2024/06/07 15:55:40 INFO: TCP listener ([::]:22000) shutting down
Jun 07 15:55:50 began-fruit syncthing[20012]: [34EQC] 2024/06/07 15:55:50 INFO: Exiting
Jun 07 15:55:50 began-fruit syncthing[20012]: [34EQC] 2024/06/07 15:55:50 INFO: Lost secondary connection to QA7JHY6 at 192.168.50.11:36996-51.81.93.224:22069/relay-client/TLS1.3-TLS_AES_128_GCM_SHA256/WAN-P50-5UMQ43VDMGP004JHH0S69MAP8U: Syncthing is being stopped (0 remain)
Jun 07 15:55:50 began-fruit systemd[1]: syncthingSession.service: Failed with result 'timeout'.
Jun 07 15:55:50 began-fruit systemd[1]: Failed to start start syncthing instance..
Jun 07 15:55:50 began-fruit systemd[1]: syncthingSession.service: Consumed 1.533s CPU time, received 52.9K IP traffic, sent 84.8K IP traffic.
warning: error(s) occurred while switching to the new configuration
looking at the logs, it looks like /bin/syncthing isn’t the correct path.
May 28 11:27:55 began-fruit systemd[1]: Starting start syncthing instance....
May 28 11:27:55 began-fruit (yncthing)[6254]: syncthingSession.service: Failed to locate executable /nix/store/mav0q76y52x65hhjdl02xpz84yr3dw8w>
May 28 11:27:55 began-fruit (yncthing)[6254]: syncthingSession.service: Failed at step EXEC spawning /nix/store/mav0q76y52x65hhjdl02xpz84yr3dw8>
May 28 11:27:55 began-fruit systemd[1]: syncthingSession.service: Main process exited, code=exited, status=203/EXEC
May 28 11:27:55 began-fruit systemd[1]: syncthingSession.service: Failed with result 'exit-code'.
May 28 11:27:55 began-fruit systemd[1]: Failed to start start syncthing instance..
May 28 11:32:54 began-fruit systemd[1]: Starting start syncthing instance...
should i be plugging in a path to /nix/store?