syncthing: Read device id from file by default

This commit is contained in:
SebastianStork 2026-02-04 17:53:05 +01:00
parent a4aaaabbe7
commit f1e10f728e
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
7 changed files with 5 additions and 8 deletions

View file

@ -19,7 +19,7 @@ in
doBackups = lib.mkEnableOption "";
deviceId = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "";
default = "${self}/hosts/${netCfg.hostName}/keys/syncthing.id" |> lib.readFile |> lib.trim;
};
syncPort = lib.mkOption {
type = lib.types.port;