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/icingaweb2: Init the module #55957

Merged
merged 1 commit into from Feb 17, 2019
Merged

nixos/icingaweb2: Init the module #55957

merged 1 commit into from Feb 17, 2019

Conversation

dasJ
Copy link
Member

@dasJ dasJ commented Feb 17, 2019

The module is indeed very large but allows configuring every aspect of
icingaweb2. The built-in monitoring module is in an own file because
there are actually more (third-party) modules and this structure means
every module can get an own file.

Motivation for this change

I'm using icingaweb2

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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

The module is indeed very large but allows configuring every aspect of
icingaweb2. The built-in monitoring module is in an own file because
there are actually more (third-party) modules and this structure means
every module can get an own file.
@ryantm
Copy link
Member

ryantm commented Feb 17, 2019

test something to ensure module evaluates when not enabled @GrahamcOfBorg test env

@ryantm ryantm merged commit c3f9fdb into NixOS:master Feb 17, 2019
@dasJ dasJ deleted the icingaweb2-module branch February 17, 2019 19:35
@infinisil
Copy link
Member

@ryantm That was a bit fast of a merge imo, such big changes warrant a bigger window for discussion, 1 hour is not enough

I'm not a fan of having huge number of options. See what I did in #45470 instead, which has multiple advantages (and some disadvantages) to this way. Advantages:

  • Much simpler to implement, less code
  • A single option doesn't clutter the docs
  • Doesn't decrease evaluation time by much, evaluation time after all is linear in the number of available options
  • When upstream adds/removes/changes certain config values, there's no need to update the NixOS module

Disadvantages:

  • Can't type check every single value, but this can be fixed by running the config file through the package while building (needs a "check config" mode for the package though)

(This is similar to just a string based option, but that wouldn't support proper merging behavior and have no guaranteed syntax correctness.)

@ryantm
Copy link
Member

ryantm commented Feb 18, 2019

@infinisil sorry. I'll give more time next time.

@dasJ
Copy link
Member Author

dasJ commented Feb 18, 2019

@infinisil do you want me to rewrite the configuration stuff?

@infinisil
Copy link
Member

Nah I'm fine with it, it's merged already and the work is done. Unless you prefer my suggestion as well and don't mind changing it again, in which case I'll be happy to work with you towards that solution (and reverting this PR meanwhile), up to you.

In any case this way is what lots of other people are doing too (having dozens of options for every single configuration option). I just hope that this idea of only a single config option will be used more in the future.

infinisil pushed a commit that referenced this pull request Apr 4, 2019
(cherry picked from commit b0daedd)

If people start relying on the many options added in
#55957 for 19.03, we wouldn't have any
chance to ever remove them.
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