Update syncthing to include device defaults

This commit is contained in:
Evie Litherland-Smith 2023-06-27 07:36:32 +01:00
parent 2b0319f5a5
commit 4e94be6e82
19 changed files with 74 additions and 77 deletions

View file

@ -1,4 +1,7 @@
.PHONY: test lock .PHONY: default test lock
default:
sudo nixos-rebuild switch --flake .
test: test:
git -C . add . git -C . add .

View file

@ -1,27 +0,0 @@
{...}: {
imports = [
./default.nix
./devices/Ion.nix
./devices/J0162.nix
./devices/Legion.nix
./devices/Monarch.nix
./devices/Northstar.nix
./devices/Vanguard.nix
./folders/notes.nix
./folders/zotero.nix
];
services.syncthing = {
user = "elitherl";
group = "users";
dataDir = "/home/elitherl";
extraOptions.options.globalAnnounceEnabled = true;
folders."Notes" = {
path = "~/notes";
devices = ["ion" "J0162" "legion" "monarch" "northstar" "vanguard"];
};
folders."Zotero" = {
path = "~/Documents/Zotero";
devices = ["ion" "J0162" "legion"];
};
};
}

View file

@ -1,27 +0,0 @@
{...}: {
imports = [
./default.nix
./devices/H0615.nix
./devices/Ion.nix
./devices/Legion.nix
./devices/Monarch.nix
./devices/Northstar.nix
./devices/Vanguard.nix
./folders/notes.nix
./folders/zotero.nix
];
services.syncthing = {
user = "elitherl";
group = "users";
dataDir = "/home/elitherl";
extraOptions.options.globalAnnounceEnabled = true;
folders."Notes" = {
path = "~/notes";
devices = ["H0615" "ion" "legion" "monarch" "northstar" "vanguard"];
};
folders."Zotero" = {
path = "~/Documents/Zotero";
devices = ["ion" "H0615" "legion"];
};
};
}

View file

@ -1,12 +1,6 @@
{...}: { {...}: {
imports = [ imports = [
./default.nix ./default.nix
./devices/H0615.nix
./devices/Ion.nix
./devices/Monarch.nix
./devices/Northstar.nix
./devices/Remarkable.nix
./devices/Vanguard.nix
./folders/archive.nix ./folders/archive.nix
./folders/books.nix ./folders/books.nix
./folders/camera.nix ./folders/camera.nix
@ -24,17 +18,15 @@
group = "users"; group = "users";
extraOptions.options.globalAnnounceEnabled = true; extraOptions.options.globalAnnounceEnabled = true;
folders = { folders = {
"Archive".devices = ["ion" "monarch" "vanguard"]; "Archive".devices = ["monarch" "vanguard"];
"Books".devices = ["monarch" "northstar" "remarkable" "vanguard"]; "Books".devices = ["monarch" "northstar" "remarkable" "vanguard"];
"Camera".devices = ["ion"];
"Comics".devices = ["ion" "monarch" "northstar" "vanguard"]; "Comics".devices = ["ion" "monarch" "northstar" "vanguard"];
"Documents".devices = ["monarch" "northstar" "vanguard"]; "Documents".devices = ["monarch" "northstar" "vanguard"];
"Exports".devices = ["monarch" "vanguard"]; "Exports".devices = ["monarch" "vanguard"];
"Movies".devices = ["ion" "monarch" "northstar" "vanguard"]; "Notes".devices = ["ion" "monarch" "northstar" "vanguard"];
"Notes".devices = ["H0615" "ion" "monarch" "northstar" "vanguard"];
"Pictures".devices = ["ion" "monarch" "northstar" "vanguard"]; "Pictures".devices = ["ion" "monarch" "northstar" "vanguard"];
"Xochitl".devices = ["remarkable"]; "Xochitl".devices = ["remarkable"];
"Zotero".devices = ["H0615"]; "Zotero".devices = ["ion"];
}; };
}; };
} }

View file

@ -1,7 +1,6 @@
{...}: { {...}: {
imports = [ imports = [
./default.nix ./default.nix
./devices/H0615.nix
./devices/Ion.nix ./devices/Ion.nix
./devices/Legion.nix ./devices/Legion.nix
./devices/Monarch.nix ./devices/Monarch.nix
@ -17,11 +16,11 @@
extraOptions.options.globalAnnounceEnabled = true; extraOptions.options.globalAnnounceEnabled = true;
folders."Notes" = { folders."Notes" = {
path = "~/notes"; path = "~/notes";
devices = ["H0615" "ion" "legion" "monarch" "northstar" "vanguard"]; devices = ["ion" "legion" "monarch" "northstar" "vanguard"];
}; };
folders."Zotero" = { folders."Zotero" = {
path = "~/Documents/Zotero"; path = "~/Documents/Zotero";
devices = ["ion" "H0615" "legion"]; devices = ["ion" "legion"];
}; };
}; };
} }

View file

@ -1,7 +1,6 @@
{...}: { {...}: {
imports = [ imports = [
./default.nix ./default.nix
./devices/H0615.nix
./devices/Ion.nix ./devices/Ion.nix
./devices/Legion.nix ./devices/Legion.nix
./devices/Monarch.nix ./devices/Monarch.nix
@ -18,10 +17,6 @@
group = "users"; group = "users";
extraOptions.options.globalAnnounceEnabled = true; extraOptions.options.globalAnnounceEnabled = true;
folders = { folders = {
"Camera" = {
path = "~/Camera";
devices = ["ion"];
};
"Comics" = { "Comics" = {
path = "~/Documents/Comics"; path = "~/Documents/Comics";
devices = ["ion" "legion" "monarch" "northstar"]; devices = ["ion" "legion" "monarch" "northstar"];
@ -32,7 +27,7 @@
}; };
"Notes" = { "Notes" = {
path = "~/notes"; path = "~/notes";
devices = ["ion" "legion" "monarch" "northstar" "H0615"]; devices = ["ion" "legion" "monarch" "northstar"];
}; };
"Pictures" = { "Pictures" = {
path = "~/Pictures"; path = "~/Pictures";

View file

@ -1,4 +1,5 @@
{lib, ...}: { {lib, ...}: {
imports = [./devices];
services.syncthing = { services.syncthing = {
enable = true; enable = true;
systemService = true; systemService = true;

View file

@ -0,0 +1,10 @@
{...}: {
imports = [
./Ion.nix
./Legion.nix
./Monarch.nix
./Northstar.nix
./Remarkable.nix
./Vanguard.nix
];
}

View file

@ -1,9 +1,11 @@
{lib, ...}: { {lib, ...}: {
imports = [../devices];
services.syncthing.folders."Archive" = { services.syncthing.folders."Archive" = {
label = "Archive"; label = "Archive";
path = lib.mkDefault "/var/lib/syncthing/Archive/"; path = lib.mkDefault "/var/lib/syncthing/Archive/";
id = "hwnqy-xzcdx"; id = "hwnqy-xzcdx";
ignorePerms = true; ignorePerms = true;
devices = lib.mkDefault ["legion" "monarch" "vanguard"];
enable = true; enable = true;
}; };
} }

View file

@ -1,9 +1,17 @@
{lib, ...}: { {lib, ...}: {
imports = [../devices];
services.syncthing.folders."Books" = { services.syncthing.folders."Books" = {
label = "Books"; label = "Books";
path = lib.mkDefault "/var/lib/syncthing/Books/"; path = lib.mkDefault "/var/lib/syncthing/Books/";
id = "zjmxy-ycmbq"; id = "zjmxy-ycmbq";
ignorePerms = true; ignorePerms = true;
devices = lib.mkDefault [
"legion"
"monarch"
"northstar"
"remarkable"
"vanguard"
];
enable = true; enable = true;
}; };
} }

View file

@ -1,10 +1,12 @@
{lib, ...}: { {lib, ...}: {
imports = [../devices];
services.syncthing.folders."Camera" = { services.syncthing.folders."Camera" = {
label = "Camera"; label = "Camera";
path = lib.mkDefault "/var/lib/syncthing/Camera/"; path = lib.mkDefault "/var/lib/syncthing/Camera/";
id = "fp4_4j7w-photos"; id = "fp4_4j7w-photos";
type = "receiveonly"; type = "receiveonly";
ignorePerms = true; ignorePerms = true;
enable = true; devices = lib.mkDefault [];
enable = false;
}; };
} }

View file

@ -1,9 +1,17 @@
{lib, ...}: { {lib, ...}: {
imports = [../devices];
services.syncthing.folders."Comics" = { services.syncthing.folders."Comics" = {
label = "Comics"; label = "Comics";
path = lib.mkDefault "/var/lib/syncthing/Comics/"; path = lib.mkDefault "/var/lib/syncthing/Comics/";
id = "kc2h0-q3wot"; id = "kc2h0-q3wot";
ignorePerms = true; ignorePerms = true;
devices = lib.mkDefault [
"ion"
"legion"
"monarch"
"northstar"
"vanguard"
];
enable = true; enable = true;
}; };
} }

View file

@ -1,9 +1,16 @@
{lib, ...}: { {lib, ...}: {
imports = [../devices];
services.syncthing.folders."Documents" = { services.syncthing.folders."Documents" = {
label = "Documents"; label = "Documents";
path = lib.mkDefault "/var/lib/syncthing/Documents/"; path = lib.mkDefault "/var/lib/syncthing/Documents/";
id = "qc6qa-bipsd"; id = "qc6qa-bipsd";
ignorePerms = true; ignorePerms = true;
devices = lib.mkDefault [
"legion"
"monarch"
"northstar"
"vanguard"
];
enable = true; enable = true;
}; };
} }

View file

@ -1,9 +1,11 @@
{lib, ...}: { {lib, ...}: {
imports = [../devices];
services.syncthing.folders."Exports" = { services.syncthing.folders."Exports" = {
label = "Exports"; label = "Exports";
path = lib.mkDefault "/var/lib/syncthing/Exports/"; path = lib.mkDefault "/var/lib/syncthing/Exports/";
id = "tof2e-pdtde"; id = "tof2e-pdtde";
ignorePerms = true; ignorePerms = true;
devices = lib.mkDefault ["legion" "monarch" "vanguard"];
enable = true; enable = true;
}; };
} }

View file

@ -1,9 +1,11 @@
{lib, ...}: { {lib, ...}: {
imports = [../devices];
services.syncthing.folders."Movies" = { services.syncthing.folders."Movies" = {
label = "Movies"; label = "Movies";
path = lib.mkDefault "/var/lib/syncthing/Movies/"; path = lib.mkDefault "/var/lib/syncthing/Movies/";
id = "3f75o-4x6sq"; id = "3f75o-4x6sq";
ignorePerms = true; ignorePerms = true;
enable = true; devices = lib.mkDefault [];
enable = false;
}; };
} }

View file

@ -1,9 +1,17 @@
{lib, ...}: { {lib, ...}: {
imports = [../devices];
services.syncthing.folders."Notes" = { services.syncthing.folders."Notes" = {
label = "Notes"; label = "Notes";
path = lib.mkDefault "/var/lib/syncthing/Notes/"; path = lib.mkDefault "/var/lib/syncthing/Notes/";
id = "4ggjz-5dyop"; id = "4ggjz-5dyop";
ignorePerms = true; ignorePerms = true;
devices = lib.mkDefault [
"ion"
"legion"
"monarch"
"northstar"
"vanguard"
];
enable = true; enable = true;
}; };
} }

View file

@ -1,9 +1,17 @@
{lib, ...}: { {lib, ...}: {
imports = [../devices];
services.syncthing.folders."Pictures" = { services.syncthing.folders."Pictures" = {
label = "Pictures"; label = "Pictures";
path = lib.mkDefault "/var/lib/syncthing/Pictures/"; path = lib.mkDefault "/var/lib/syncthing/Pictures/";
id = "ziuj8-rm6dn"; id = "ziuj8-rm6dn";
ignorePerms = true; ignorePerms = true;
devices = lib.mkDefault [
"ion"
"legion"
"monarch"
"northstar"
"vanguard"
];
enable = true; enable = true;
}; };
} }

View file

@ -1,10 +1,12 @@
{lib, ...}: { {lib, ...}: {
imports = [../devices];
services.syncthing.folders."Xochitl" = { services.syncthing.folders."Xochitl" = {
label = "Xochitl"; label = "Xochitl";
path = lib.mkDefault "/var/lib/syncthing/Xochitl/"; path = lib.mkDefault "/var/lib/syncthing/Xochitl/";
id = "dkcbx-kq7hl"; id = "dkcbx-kq7hl";
type = "receiveonly"; type = "receiveonly";
ignorePerms = true; ignorePerms = true;
devices = lib.mkDefault ["legion" "remarkable"];
enable = true; enable = true;
}; };
} }

View file

@ -1,9 +1,11 @@
{lib, ...}: { {lib, ...}: {
imports = [../devices];
services.syncthing.folders."Zotero" = { services.syncthing.folders."Zotero" = {
label = "Zotero"; label = "Zotero";
path = lib.mkDefault "/var/lib/syncthing/Zotero/"; path = lib.mkDefault "/var/lib/syncthing/Zotero/";
id = "huyvn-liwc9"; id = "huyvn-liwc9";
ignorePerms = true; ignorePerms = true;
devices = lib.mkDefault ["ion" "legion"];
enable = true; enable = true;
}; };
} }