Skip to content
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/ddclient: Fix #49258 #49312

Merged
merged 1 commit into from Oct 31, 2018
Merged

nixos/ddclient: Fix #49258 #49312

merged 1 commit into from Oct 31, 2018

Conversation

typetetris
Copy link
Contributor

Motivation for this change

from 18.03 to 18.09 the option services.ddclient.domain was changed to services.ddclient.domains
and services.ddclient.domain became a rename for the services.ddclient.domains option.
Sadly that was also a type change from str to listOf str and so, one can't keep the configuration
from 18.03 and has to change it, which makes for a rough transition from 18.03 to 18.09.

Otherwise introducing the change would break the configuration for those people,
who changed the type of the value but kept the name domain for the configuration
option.

People, which also changed the name of the option from domain to domains
will not be affected by the fix and so I think the fix is still a good idea, as most likely
people will also change the name of the option.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.
  • built my nixos system with this and checked the resulting file /etc/ddclient.conf.

@typetetris
Copy link
Contributor Author

See #49258

@Mic92
Copy link
Member

Mic92 commented Oct 28, 2018

If this change is also relevant to master, please change the target branch.

@typetetris
Copy link
Contributor Author

Sorry for the mess with the branches.
I changed the target to master. But it should be backported to release-18.09 as well.

@joachifm
Copy link
Contributor

Not to overcomplicate things but iirc there is a mkMergedOptionModule which seems apt for this use case, e.g., rewriting an option into another (potentially of a different type) while printing a warning. Does that work here?

@typetetris
Copy link
Contributor Author

I think mkChangedOptionModule is even more appropriate, as there is only one old option, which needs to get merged?

@joachifm
Copy link
Contributor

Sure, whichever you think fits best

@joachifm joachifm merged commit 3033906 into NixOS:master Oct 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants