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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/postgresql: turn settings
into a submodule
#296616
Conversation
96058ce
to
16ba914
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/3674 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the change and I also prefer the Sandro's suggestion. It's shorter and easier to reason about.
@Ma27 Can you merge them? So we can proceed?
16ba914
to
00f7f15
Compare
I don't think it makes that much of a difference (and is also not related to the diff), but I won't die on this hill. Updated accordingly. |
The main idea behind that was to be able to do more sophisticated merging for stuff that goes into `postgresql.conf`: `shared_preload_libraries` is a comma-separated list in a `types.str` and thus not mergeable. With this change, the option accepts both a comma-separated string xor a list of strings. This can be implemented rather quick using `coercedTo` + freeform modules. The interface still behaves equally, but it allows to merge declarations for this option together. One side-effect was that I had to change the `attrsOf (oneOf ...)` part into a submodule to allow declaring options for certain things. While at it, I decided to move `log_line_prefix` and `port` into this structure as well.
00f7f15
to
5142b7a
Compare
Rebased onto latest master and resolved the merge conflict. Any final comments? |
Is this a breaking change? It looks like it renames a couple of options without forwarding ... |
@bendlas which options specifically? Unless I'm missing something, it isn't. I see that the manual build fails now though, will fix that soonish. |
@Ma27 maybe I'm being dense, but what happens if somebody is running a configuration with |
|
OK, thanks, I missed that |
OK no idea what's up with the manual build, seems as if some cachix steps are failing in the GH action stuff here. Rerunning for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you!
Description of changes
The main idea behind that was to be able to do more sophisticated merging for stuff that goes into
postgresql.conf
:shared_preload_libraries
is a comma-separated list in atypes.str
and thus not mergeable. With this change, the option accepts both a comma-separated string xor a list of strings.This can be implemented rather quick using
coercedTo
+ freeform modules. The interface still behaves equally, but it allows to merge declarations for this option together.One side-effect was that I had to change the
attrsOf (oneOf ...)
part into a submodule to allow declaring options for certain things. While at it, I decided to movelog_line_prefix
andport
into this structure as well.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 馃憤 reaction to pull requests you find important.