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

View file

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

View file

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

View file

@ -1,4 +1,5 @@
{lib, ...}: {
imports = [./devices];
services.syncthing = {
enable = 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, ...}: {
imports = [../devices];
services.syncthing.folders."Archive" = {
label = "Archive";
path = lib.mkDefault "/var/lib/syncthing/Archive/";
id = "hwnqy-xzcdx";
ignorePerms = true;
devices = lib.mkDefault ["legion" "monarch" "vanguard"];
enable = true;
};
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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