Skip to content

nixos/syncthing: declare ignore patterns (resolves #268282) #353770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zorrobert
Copy link

@zorrobert zorrobert commented Nov 5, 2024

This PR adds an option to declaratively add ignore patterns to a syncthing folder. Patterns are added as a list of strings which is send to the syncthing service via the rest api.

This resolves #268282.

Things done

I've been using this for a few months now and it works with no issues.

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Nov 5, 2024
@NixOSInfra NixOSInfra added the 12.first-time contribution This PR is the author's first one; please be gentle! label Nov 5, 2024
@zorrobert zorrobert changed the title syncthing: declare ignore patterns #268282 syncthing: declare ignore patterns (implements #268282) Nov 5, 2024
@zorrobert zorrobert marked this pull request as ready for review November 5, 2024 08:04
@itepastra
Copy link
Member

I think you need to use one of these for the issue to close correctly when this is merged

@zorrobert zorrobert changed the title syncthing: declare ignore patterns (implements #268282) syncthing: declare ignore patterns (resolves #268282) Nov 5, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Nov 5, 2024
@ck3d
Copy link
Contributor

ck3d commented Jan 2, 2025

Could you please add an NixOS test for this feature and please remove the merge master commit..

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 2, 2025
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jun 1, 2025
@zorrobert zorrobert changed the title syncthing: declare ignore patterns (resolves #268282) nixos/syncthing: declare ignore patterns (resolves #268282) Jun 2, 2025
@zorrobert
Copy link
Author

Hi @ck3d, I resolved the merge conflicts and added a test case, can you take a look?

@ck3d
Copy link
Contributor

ck3d commented Jun 2, 2025

LGTM

@zorrobert
Copy link
Author

Hi, can this be merged or is there something left to do? @ck3d @peterhoeg @jokogr

@nixpkgs-ci nixpkgs-ci bot added the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 5, 2025
@Masrkai
Copy link

Masrkai commented Jul 9, 2025

this is a basic yet critical feature already provided by syncthing, please review this and merge it as soon as possible.

@zorrobert
Copy link
Author

zorrobert commented Aug 17, 2025

Hi, sorry to bother you, but I wanted to ask for someone to review or merge this PR. If you have questions I'll try my best to answer them and make the changes needed to get this merged.
If you don't have the time to review/merge right now that's fine, I just wanted to ask for an update since the PR has been open for some time now.
@ck3d @itepastra @Jayman2000 @h33p @jfly @bjornfor

Copy link
Contributor

@ck3d ck3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. and removed 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Aug 17, 2025
Syncthing can be configured to ignore certain files and
directories via ignore patterns. This PR adds a new nix option to
set these patterns declaratively.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Add "Ignore Patterns" option to Syncthing folders
7 participants