-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
nixos/syncthing: readd settings.device.<name>.introducer option #262191
Conversation
First PR, be gentle :) |
Hello @WillPower3309, welcome to nixpkgs! #226088 references a very notable RFC, named RFC 42. The essence of what this RFC is saying, is that we're going to have a hard time maintaining copies of the config schema of every single service out there. The better alternative is to use something known as freeform modules. You can declare an option (usually called This option should still be working fine, it's just not declared anymore, as it was probably deemed not important enough. I might be wrong about the last part though, and they just forgot it in the process 😅. If it does not work or causes errors, you can disregard this comment completely. |
I see! Thanks for the context there. In the case of the syncthing module, the settings are set via the syncthing API which then writes to a config.xml. Would setting the values for that file as you described overwrite that file? If so, the rfc would be incompatible with how we use the module |
@Xyz00777 sorry for the ping, do you mind providing more context? |
@Lassulus rfc42 and syncthing api config. |
The syncthing module uses the API, so only options which are present in your configuration are synced to the config.xml.
should work already without this PR merged. In a freeform module we would just add the option for documentation sake. Also, if we really want to add this option, it should default to none as it is then removed from the API payload and the currently set value would persist. This is important because otherwise we would always override it to false if people would set it imperatively as in using the webinterface. |
Ah got it, I think I misunderstood the initial comment that the settings could be set to values other than those that are documented in the module, such as |
Description of changes
Seems this option was (accidentally?) removed in #226088
Things done
Tested that it works:
with nix config:
the following config.xml section is generated
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)