nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
6.66k stars 1.75k forks source link

Add declarative config options for Syncthing #4049

Open Anomalocaridid opened 1 year ago

Anomalocaridid commented 1 year ago

Description

The syncthing service can be declaratively configured at the OS level using the various nixpkgs options under services.syncthing. However, Home Manager lacks equivalents for all except for the bare minimum, which makes declaratively configuring syncthing from userspace significantly more difficult.

stale[bot] commented 1 year ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

charlot-shaw commented 11 months ago

I also would appreciate better configuration for syncthing via home-manager.

Although I have the option to manage it at the system level, I find it a clash of expectations that I need to have the system administrator pick out what folders I, the user, can sync and with whom.

It's that or do some bodge with home.file, which is not great.

Thymelizabeth commented 9 months ago

Syncthing has just changed to using $XDG_STATE_DIR by default, which could change things.

MattSturgeon commented 6 months ago

Looks like NixOS does this fairly imperatively;

At build time it generates an updateConfig shell script, which does most of its work by calling Syncthing's REST API (at localhost:8384) using curl.

This shell script then gets run by one of the systemd services.

I don't see any reason why the NixOS solution couldn't be ported to home-manager more-or-less as-is?

TheHans255 commented 5 months ago

+1 for this. In particular, I can't set up Syncthing as a system level service because I need to have two separate instances of Syncthing running on the same computer for different users.

HPRIOR commented 4 months ago

+1 would like to declare my config and share between linux and mac environments with home-manager

stale[bot] commented 1 month ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.