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/acme: execute a single lego command #91042

Merged
merged 1 commit into from
Jul 6, 2020

Conversation

datafoo
Copy link
Contributor

@datafoo datafoo commented Jun 18, 2020

Motivation for this change

See #86184.

This implementation follows the workaround indicated go-acme/lego#693 (comment).

Things done
  • Tested using NixOps
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jun 18, 2020
@flokli
Copy link
Contributor

flokli commented Jun 18, 2020

cc @maralorn

Copy link
Member

@maralorn maralorn left a comment

Choose a reason for hiding this comment

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

Overall this change looks great. Thank you very much!

But I have not tested it.

nixos/modules/security/acme.nix Outdated Show resolved Hide resolved
@datafoo
Copy link
Contributor Author

datafoo commented Jun 18, 2020

Overall this change looks great. Thank you very much!

I must say though that I am not a fan of my own work here.

We are introducing new dependencies on openssl and perl to fix a little something that should logically be done in lego (#216, #290, #693). 4 years and 3 issues later, that does not seem to be a priority for lego to fix this.

@m1cr0man: you introduced the change to Lego. Was Lego the only choice for what we need in NixOS?

Stop trying to execute `lego renew` if that is not necessary.

Fix NixOS#86184.
@mweinelt mweinelt requested a review from a team June 19, 2020 13:00
Copy link
Contributor

@m1cr0man m1cr0man left a comment

Choose a reason for hiding this comment

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

Hi datafoo! This is a nice solution, using openssl makes sense and probably doesn't hurt to make it a dependency. It's inevitable that it would be needed on a system using the acme module in the first place.

As for whether lego was the only choice, and why I chose it. Initially, my PR was based on another PR that used lego and that had received sufficient reviews and discussion to justify the selection of lego, and I certainly wasn't familiar enough with any other client to convince people otherwise. I simply continued the implementation and got it merged, having had it in production for a couple months beforehand.

However, I have been working on an update to the acme module as a whole.. I've been delayed just by being busy at work, but it does address this issue along with many, many others. I'll open a WIP PR now, which I should've done ages ago, and you can decide if you want to merge this PR regardless. If I don't get my work finished, this should definitely be added.

@flokli
Copy link
Contributor

flokli commented Jun 19, 2020

I think this PR is an improvement as well - let's merge it 👍

@mweinelt
Copy link
Member

The acme update mentioned is here #91121.

@datafoo
Copy link
Contributor Author

datafoo commented Jul 3, 2020

Is it good to merge then?

@m1cr0man
Copy link
Contributor

m1cr0man commented Jul 3, 2020

Yeah go for it! :)

@datafoo
Copy link
Contributor Author

datafoo commented Jul 3, 2020

Yeah go for it! :)

I believe I do not have such permission on this repo.

@arianvp arianvp self-requested a review July 3, 2020 10:06
@m1cr0man
Copy link
Contributor

m1cr0man commented Jul 3, 2020

Yeah go for it! :)

I believe I do not have such permission on this repo.

Ah, yes 😅 someone should be able to do it today for you.

@arianvp
Copy link
Member

arianvp commented Jul 3, 2020

@GrahamcOfBorg test acme

@aanderse
Copy link
Member

aanderse commented Jul 6, 2020

Merging entirely based on discussion.

@aanderse aanderse merged commit 5cecdd1 into NixOS:master Jul 6, 2020
@datafoo datafoo deleted the fix-issue-86184 branch January 10, 2022 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants