From 08100d41e6b504ba06fa44d1c70132090c213fee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Fri, 14 Nov 2025 10:18:33 +0100 Subject: [PATCH] nextcloud-sync: Support for ignoring folder --- hm/accounts/nextcloud.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hm/accounts/nextcloud.nix b/hm/accounts/nextcloud.nix index 3665436..4c35737 100644 --- a/hm/accounts/nextcloud.nix +++ b/hm/accounts/nextcloud.nix @@ -26,6 +26,7 @@ in url="$1" remote="$2" local="$3" + unsyncedfolders="$4" echo "Syncing $url $remote to $local" # Adding to Syncthing ignores (so it's not double-synced) @@ -49,7 +50,7 @@ in # Actual syncing mkdir -p "$local" - nextcloudcmd -n -h --path "$remote" "$local" "$url" + nextcloudcmd --non-interactive -n -h --path "$remote" --unsyncedfolders "$unsyncedfolders" "$local" "$url" } '' @@ -60,6 +61,7 @@ in n.url n.remote "${config.home.homeDirectory}/${n.local}" + (pkgs.writeText "nextcloud-unsynced-folders.txt" (lib.strings.concatLines n.unsyncedFolders)) ] } '')) @@ -101,6 +103,11 @@ in description = "Remote path to sync"; default = "/"; }; + unsyncedFolders = lib.mkOption { + type = lib.types.listOf lib.types.str; + description = "Folders not to sync"; + default = []; + }; }; } )