1 { config, lib, pkgs, ... }:
3 localpkgs = import ../. { inherit pkgs; };
4 register-script = pkgs.writeShellScript "syncthing-autoregister-script" ''
5 ${localpkgs.syncthing-set-id}/bin/syncthing-set-id /tmp/syncthing-auto-register-test-device-ids.nix
9 systemd.services.syncthing-autoregister = {
10 after = [ "syncthing.service" "syncthing-init.service" ];
11 wantedBy = [ "multi-user.target" ];
12 environment.NIX_PATH = config.environment.variables.NIX_PATH;
14 User = config.services.syncthing.user;
15 RemainAfterExit = true;
17 ExecStart = register-script;