Skip to content

Commit 8c8efe1

Browse files
committed
Use new Syncthing option names
Ever since this PR [1], some of the Syncthing options that I’ve been using have new names. The old names are deprecated. This commit makes it so that I don’t use the deprecated names anymore. Fixes <mid:bu4dbznoivldxaxkdyzkd472vryl7wqzcvjunrg5pqe7ta5bu4@6pic33ncld5n>. [1]: <NixOS/nixpkgs#226088>
1 parent fa75ef9 commit 8c8efe1

File tree

4 files changed

+45
-43
lines changed

4 files changed

+45
-43
lines changed

src/modules/games.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
then
107107
"/var/empty"
108108
else
109-
config.services.syncthing.folders."Game Data".path
109+
config.services.syncthing.settings.folders."Game Data".path
110110
);
111111
doomDataPath = "${gameDataPath}/doom";
112112
soundFontPath = "${gameDataPath}/soundfonts/GM.sf2";

src/modules/graphical-test-vm.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
];
1717
networking.hostName = "Graphical-Test-VM";
1818
time.timeZone = "America/New_York";
19-
services.syncthing.folders = {
19+
services.syncthing.settings.folders = {
2020
"Keep Across Linux Distros!".path = "/home/jayman/Documents/Home/Syncthing/.save";
2121
};
2222
}

src/modules/jason-desktop-linux.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
hardware.steam-hardware.enable = true;
2828
programs.steam.enable = true;
2929

30-
services.syncthing.folders = {
30+
services.syncthing.settings.folders = {
3131
"Keep Across Linux Distros!".path = "/hdd/home/jayman/Syncthing/.save";
3232
"Projects".path = "/hdd/home/jayman/Syncthing/Projects";
3333
"Game Data".path = "/hdd/home/jayman/Syncthing/Game Data";

src/modules/syncthing.nix

+42-40
Original file line numberDiff line numberDiff line change
@@ -8,50 +8,52 @@
88
user = "jayman";
99

1010
dataDir = "/home/jayman/Documents/Home/Syncthing";
11-
extraOptions.gui.tls = true;
1211
overrideDevices = true;
1312
overrideFolders = true;
1413
openDefaultPorts = true;
1514

16-
devices = let
17-
desktop-device = {
18-
"Jason-Desktop-Linux" = { id = "KADJ4K2-U73CLZH-L6ADY3J-FRFPVUH-HQF3NQZ-472YGQU-K43NZWS-LLDX5AX"; };
19-
};
20-
graphical-test-vm-device = {
21-
"Graphical-Test-VM" = { id = "WEHPXTB-ZFPDAJ4-NRSLXVG-FOJENRH-WVNGVKK-7YUUJUZ-OM7CUG7-NJFTKQU"; };
22-
};
23-
in
24-
{
25-
"Server" = { id = "QZBHFNE-XJWGGY4-6JXYMD3-D3HVGR2-C64BVH2-6M644XU-RSVRGAS-QZ752Q7"; };
26-
"Jason-Lemur-Pro" = { id = "HDJCH46-RZMHE3K-T6S3G6N-662CFFW-CIAVKTI-BN6B32M-LFQCQKX-GG575AV"; };
27-
"Jason-Lemur-Pro-VM-Test" = { id = "2MOLIOF-XEWO4JR-PUE4NUS-I3YSRGM-X374W7F-6BXK4S6-UGXVIL6-TYWHWAC"; };
28-
"Jason-Desktop-Windows" = { id = "IJ7DGZZ-HEOL43C-4RCWITD-QCATRWR-HPTWFR3-XTTYEZW-QUV4CBL-5P7AGQF"; };
29-
# In other words, only add each device to the devices list if this config isn’t being deployed on that device.
30-
} // (if config.networking.hostName != "Jason-Desktop-Linux" then desktop-device else { })
31-
// (if config.networking.hostName != "Graphical-Test-VM" then graphical-test-vm-device else { });
15+
settings = {
16+
extraOptions.gui.tls = true;
17+
devices = let
18+
desktop-device = {
19+
"Jason-Desktop-Linux" = { id = "KADJ4K2-U73CLZH-L6ADY3J-FRFPVUH-HQF3NQZ-472YGQU-K43NZWS-LLDX5AX"; };
20+
};
21+
graphical-test-vm-device = {
22+
"Graphical-Test-VM" = { id = "WEHPXTB-ZFPDAJ4-NRSLXVG-FOJENRH-WVNGVKK-7YUUJUZ-OM7CUG7-NJFTKQU"; };
23+
};
24+
in
25+
{
26+
"Server" = { id = "QZBHFNE-XJWGGY4-6JXYMD3-D3HVGR2-C64BVH2-6M644XU-RSVRGAS-QZ752Q7"; };
27+
"Jason-Lemur-Pro" = { id = "HDJCH46-RZMHE3K-T6S3G6N-662CFFW-CIAVKTI-BN6B32M-LFQCQKX-GG575AV"; };
28+
"Jason-Lemur-Pro-VM-Test" = { id = "2MOLIOF-XEWO4JR-PUE4NUS-I3YSRGM-X374W7F-6BXK4S6-UGXVIL6-TYWHWAC"; };
29+
"Jason-Desktop-Windows" = { id = "IJ7DGZZ-HEOL43C-4RCWITD-QCATRWR-HPTWFR3-XTTYEZW-QUV4CBL-5P7AGQF"; };
30+
# In other words, only add each device to the devices list if this config isn’t being deployed on that device.
31+
} // (if config.networking.hostName != "Jason-Desktop-Linux" then desktop-device else { })
32+
// (if config.networking.hostName != "Graphical-Test-VM" then graphical-test-vm-device else { });
3233

33-
folders = let
34-
all-others-except-vms = [
35-
"Server"
36-
"Jason-Lemur-Pro"
37-
"Jason-Desktop-Windows"
38-
] ++ (if config.networking.hostName != "Jason-Desktop-Linux" then [ "Jason-Desktop-Linux" ] else [ ]);
39-
in
40-
{
41-
"Keep Across Linux Distros!" = {
42-
id = "syrpl-vpqnk";
43-
devices = all-others-except-vms ++ [ "Jason-Lemur-Pro-VM-Test" ] ++ (if config.networking.hostName != "Graphical-Test-VM" then [ "Graphical-Test-VM" ] else [ ]);
44-
};
45-
# In other words, only add the Projects and Game Data folders if we’re not deploying on Graphical-Test-VM.
46-
} // (if config.networking.hostName != "Graphical-Test-VM" then {
47-
"Projects" = {
48-
id = "mjwge-zeznc";
49-
devices = all-others-except-vms;
50-
};
51-
"Game Data" = {
52-
id = "eheef-uq5hv";
53-
devices = all-others-except-vms;
54-
};
55-
} else { });
34+
folders = let
35+
all-others-except-vms = [
36+
"Server"
37+
"Jason-Lemur-Pro"
38+
"Jason-Desktop-Windows"
39+
] ++ (if config.networking.hostName != "Jason-Desktop-Linux" then [ "Jason-Desktop-Linux" ] else [ ]);
40+
in
41+
{
42+
"Keep Across Linux Distros!" = {
43+
id = "syrpl-vpqnk";
44+
devices = all-others-except-vms ++ [ "Jason-Lemur-Pro-VM-Test" ] ++ (if config.networking.hostName != "Graphical-Test-VM" then [ "Graphical-Test-VM" ] else [ ]);
45+
};
46+
# In other words, only add the Projects and Game Data folders if we’re not deploying on Graphical-Test-VM.
47+
} // (if config.networking.hostName != "Graphical-Test-VM" then {
48+
"Projects" = {
49+
id = "mjwge-zeznc";
50+
devices = all-others-except-vms;
51+
};
52+
"Game Data" = {
53+
id = "eheef-uq5hv";
54+
devices = all-others-except-vms;
55+
};
56+
} else { });
57+
};
5658
};
5759
}

0 commit comments

Comments
 (0)