nixos/bluemap: fix defaults issue with services.bluemap.host#320836
nixos/bluemap: fix defaults issue with services.bluemap.host#320836pbsds merged 1 commit intoNixOS:masterfrom
services.bluemap.host#320836Conversation
|
Woops! Thanks for noticing! A problem with this approach is that you now have to read the module source to find out that it's hosted on A bigger issue is probably that you can't now refer to Maybe we could just remove the default entirely? |
I started with that, but went the way I currently did in order to not have a breaking change. If you're OK with breaking any users that were relying on |
|
perhaps retarget this to 24.05 and drop the default on unstable? Up to the maintainers to decide |
|
I think there's no good solution here. If someone has this for example: services.nginx.virtualHosts."${config.services.bluemap.host}" = {
enableACME = true;
forceSSL = true;
};their nginx config will break at runtime completely silently in a probably hard to debug way. This is very relevant since I expect setting these kinds of settings would be very common. I dont think either solution has a large impact so none of this is really important. The module is less than a month old, and has probably very very few users. But I'm erring towards just cleanly breaking at build time and ripping the band-aid off. I could probably easily be swayed either way |
|
Since it's a month old, that makes my concern about existing users pretty minor. I'll simplify and remove the |
00e97e9 to
a3601a3
Compare
D4ndellion
left a comment
There was a problem hiding this comment.
These are some completely non-blocking nitpicks!
a3601a3 to
ef731fb
Compare
|
Hold off on merging: I haven't actually built a VM with these settings set. |
The default for this value depends on `config.networking.domain`, which is typed as `types.nullOr types.str` in nixos/modules/tasks/network-interfaces.nix As a result, the default for `services.bluemap.host` either has to be `types.nullOr types.str`, or we need to drop the default. Based on PR feedback, this commit drops the default and requires configuration through the `services.bluemap.host` option. While this is a breaking change, since the module is a month old, there should be very few users so far.
ef731fb to
3ac49bc
Compare
|
Now it's a super-simple change. Thanks for the feedback; I learned a lot about how defaults (or lack thereof) work in the module system. It's nice that a variable which is used but not defined blows up with a good error. |
Description of changes
The default for the
services.bluemap.hostvalue depends onconfig.networking.domain, which is typed astypes.nullOr types.strin nixos/modules/tasks/network-interfaces.nixAs a result, the default for
services.bluemap.hosteither has to betypes.nullOr types.str, or we need to drop the default.Based on PR feedback, this commit drops the default and requires configuration through the
services.bluemap.hostoption.While this is a breaking change, since the module is a month old, there should be very few users so far.
I discovered this while testing out #313497.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)