From 2bd61932860daabd2f5f52ae51c442bad2ea7744 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 19 Oct 2023 08:29:32 +0100 Subject: [PATCH] Reduce folders in syncthing Only sync pictures and zotero library using syncthing, moving the rest to NextCloud --- hosts/Legion/configuration.nix | 7 ----- hosts/Monarch/home.nix | 1 - hosts/Ronin/configuration.nix | 9 +------ hosts/Scorch/configuration.nix | 9 +------ hosts/Vanguard/configuration.nix | 10 +------- services/syncthing/default.nix | 44 +++----------------------------- 6 files changed, 6 insertions(+), 74 deletions(-) diff --git a/hosts/Legion/configuration.nix b/hosts/Legion/configuration.nix index b5849e67..caf39803 100644 --- a/hosts/Legion/configuration.nix +++ b/hosts/Legion/configuration.nix @@ -33,14 +33,7 @@ in { in { inherit dataDir; settings.folders = { - "Archive".path = dataDir + "/Archive"; - "Books".path = dataDir + "/Books"; - "Comics".path = dataDir + "/Comics"; - "Documents".path = dataDir + "/Documents"; - "Exports".path = dataDir + "/Exports"; - "Notes".path = dataDir + "/Notes"; "Pictures".path = dataDir + "/Pictures"; - "Tasks".path = dataDir + "/Tasks"; "Zotero".path = dataDir + "/Zotero"; }; }; diff --git a/hosts/Monarch/home.nix b/hosts/Monarch/home.nix index 79aa0202..6b541bab 100644 --- a/hosts/Monarch/home.nix +++ b/hosts/Monarch/home.nix @@ -14,5 +14,4 @@ }; emacs.package = pkgs.emacs29; }; - services.syncthing.enable = true; } diff --git a/hosts/Ronin/configuration.nix b/hosts/Ronin/configuration.nix index a348a103..46089046 100644 --- a/hosts/Ronin/configuration.nix +++ b/hosts/Ronin/configuration.nix @@ -17,12 +17,5 @@ ''; systemPackages = with pkgs; [ openfortivpn ]; }; - services.syncthing.settings.folders = { - "Archive".enable = false; - "Books".enable = false; - "Comics".enable = false; - "Documents".enable = false; - "Exports".enable = false; - "Pictures".enable = false; - }; + services.syncthing.settings.folders = { "Pictures".enable = false; }; } diff --git a/hosts/Scorch/configuration.nix b/hosts/Scorch/configuration.nix index db8f2e87..e07b6562 100644 --- a/hosts/Scorch/configuration.nix +++ b/hosts/Scorch/configuration.nix @@ -16,12 +16,5 @@ boot.initrd.luks.devices."luks-47d34268-5100-4eba-b34d-220f4239c1cb".keyFile = "/crypto_keyfile.bin"; - services.syncthing.settings.folders = { - "Archive".enable = false; - "Books".enable = false; - "Comics".enable = false; - "Documents".enable = false; - "Exports".enable = false; - "Pictures".enable = false; - }; + services.syncthing.settings.folders = { "Pictures".enable = false; }; } diff --git a/hosts/Vanguard/configuration.nix b/hosts/Vanguard/configuration.nix index 8028e632..dd5f6f5c 100644 --- a/hosts/Vanguard/configuration.nix +++ b/hosts/Vanguard/configuration.nix @@ -3,12 +3,4 @@ # and in the NixOS manual (accessible by running ‘nixos-help’). { ... }: -{ - services.syncthing.settings.folders = { - "Archive".enable = false; - "Books".enable = false; - "Comics".enable = false; - "Exports".enable = false; - "Pictures".enable = false; - }; -} +{ } diff --git a/services/syncthing/default.nix b/services/syncthing/default.nix index 1b4244ec..5996394d 100644 --- a/services/syncthing/default.nix +++ b/services/syncthing/default.nix @@ -1,7 +1,5 @@ { config, lib, pkgs, user, ... }: -let - devices = [ "Legion" "Northstar" "Ronin" "Scorch" "Vanguard" ]; - devicesWithPhone = devices ++ [ "Ion" ]; +let devices = [ "Ion" "Legion" "Northstar" "Ronin" "Scorch" "Vanguard" ]; in { services.syncthing = { inherit user; @@ -26,53 +24,17 @@ in { "I366QNQ-D3FTDRX-RNOTXMW-YITZXOF-DSCDMQD-63Q72LI-ME2Y4HZ-T34RMQK"; }; folders = { - "Archive" = { - inherit devices; - id = "hwnqy-xzcdx"; - path = lib.mkDefault "~/Documents/Archive"; - ignorePerms = true; - }; - "Books" = { - inherit devices; - id = "zjmxy-ycmbq"; - path = lib.mkDefault "~/Documents/Books"; - ignorePerms = true; - }; - "Comics" = { - inherit devices; - id = "kc2h0-q3wot"; - path = lib.mkDefault "~/Documents/Comics"; - ignorePerms = true; - }; - "Documents" = { - id = "qc6qa-bipsd"; - path = lib.mkDefault "~/Documents/Sync"; - ignorePerms = true; - devices = devicesWithPhone; - }; - "Exports" = { - inherit devices; - id = "tof2e-pdtde"; - path = lib.mkDefault "~/Documents/Exports"; - ignorePerms = true; - }; - "Notes" = { - id = "4ggjz-5dyop"; - path = lib.mkDefault "~/Notes"; - ignorePerms = true; - devices = devicesWithPhone; - }; "Pictures" = { id = "ziuj8-rm6dn"; path = lib.mkDefault "~/Pictures"; ignorePerms = true; - devices = devicesWithPhone; + devices = devices; }; "Zotero" = { id = "huyvn-liwc9"; path = lib.mkDefault "~/Documents/Zotero"; ignorePerms = true; - devices = devicesWithPhone; + devices = devices; }; }; };