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

@ -15,8 +15,6 @@
}; };
}; };
services.syncthing.deviceId = "FAJS5WM-UAWGW2U-FXCGPSP-VAUOTGM-XUKSEES-D66PMCJ-WBODJLV-XTNCRA7";
programs.steam.enable = true; programs.steam.enable = true;
}; };
} }

View file

@ -0,0 +1 @@
FAJS5WM-UAWGW2U-FXCGPSP-VAUOTGM-XUKSEES-D66PMCJ-WBODJLV-XTNCRA7

View file

@ -16,10 +16,7 @@
}; };
}; };
services = { services.bluetooth.enable = true;
bluetooth.enable = true;
syncthing.deviceId = "Q4YPD3V-GXZPHSN-PT5X4PU-FBG4GX2-IASBX75-7NYMG75-4EJHBMZ-4WGDDAP";
};
programs = { programs = {
winboat.enable = true; winboat.enable = true;

View file

@ -0,0 +1 @@
Q4YPD3V-GXZPHSN-PT5X4PU-FBG4GX2-IASBX75-7NYMG75-4EJHBMZ-4WGDDAP

View file

@ -28,7 +28,6 @@
dns.enable = true; dns.enable = true;
syncthing = { syncthing = {
enable = true; enable = true;
deviceId = "5R2MH7T-Q2ZZS2P-ZMSQ2UJ-B6VBHES-XYLNMZ6-7FYC27L-4P7MGJ2-FY4ITQD";
isServer = true; isServer = true;
gui.domain = "syncthing.${privateDomain}"; gui.domain = "syncthing.${privateDomain}";
doBackups = true; doBackups = true;

View file

@ -0,0 +1 @@
5R2MH7T-Q2ZZS2P-ZMSQ2UJ-B6VBHES-XYLNMZ6-7FYC27L-4P7MGJ2-FY4ITQD

View file

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