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/krb5: complete rewrite #30014

Merged
merged 2 commits into from Oct 3, 2017
Merged

nixos/krb5: complete rewrite #30014

merged 2 commits into from Oct 3, 2017

Conversation

eqyiel
Copy link
Contributor

@eqyiel eqyiel commented Oct 2, 2017

Motivation for this change

The krb5 service was a bit lacking.

Addresses #11268, partially addresses #29623.

I've made an effort to accommodate people who are using the old configuration keys.

Given the state that it was in though, I wonder anyone even used this module.

Also I'm not sure if this is an abuse of the testing framework. Snapshot testing is something I do a lot of in web development so it makes sense to me to try it here.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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/)
  • Fits CONTRIBUTING.md.

The `krb5` service was a bit lacking.

Addresses NixOS#11268, partially addresses NixOS#29623.
@Mic92
Copy link
Member

Mic92 commented Oct 2, 2017

Tests looks ok, but maybe launching a vm is not necessary. @Profpatsch do you have a better idea here?

example = "ATHENA.MIT.EDU";
description = ''
DEPRECATED, please use
<literal>krb5.libdefaults.default_realm</literal>.
Copy link
Member

@Mic92 Mic92 Oct 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you aware of nixos/modules/rename.nix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, this only forwards definitions for deprecated options that have a one-to-one mapping to non-deprecated options (or just prints a warning saying what to do). Do you think it's worth it to use mkRenamedOptionModule for the only deprecated option that does have a one-to-one relationship with a non-deprecated option (the one you commented on), or to go all in on mkRenamedOptionModule and say that those deprecated options are no longer supported at all?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah probably not that useful here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's how I feel about it too, but not strongly - I would be happy to change it if that is the preferred way of doing things!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a deprecation date instead

@Mic92
Copy link
Member

Mic92 commented Oct 3, 2017

I successfully transformed my old krb5 configuration to the new module syntax: Mic92/dotfiles@b96e0b7

@Mic92 Mic92 merged commit 0b18fa4 into NixOS:master Oct 3, 2017
@Mic92
Copy link
Member

Mic92 commented Oct 3, 2017

Nice work. I also gave up on the old module back then and used the configuration file instead.

@eqyiel
Copy link
Contributor Author

eqyiel commented Oct 3, 2017

Thanks!!

@eqyiel eqyiel deleted the krb5-fixes branch October 3, 2017 21:53
@Profpatsch
Copy link
Member

Tests looks ok, but maybe launching a vm is not necessary. @Profpatsch do you have a better idea here?

For service modules it’s kind of hard to test the correct functionality without a NixOS VM. :)
If you want to test just the executable though, that could be done. Of course one can also mix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants