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

20.09: preliminary self-signed certificates fail to generate #72

Closed
fgaz opened this issue Oct 29, 2020 · 5 comments · Fixed by #74
Closed

20.09: preliminary self-signed certificates fail to generate #72

fgaz opened this issue Oct 29, 2020 · 5 comments · Fixed by #74

Comments

@fgaz
Copy link
Collaborator

fgaz commented Oct 29, 2020

[...]
Oct 29 13:58:26 nixos nixcloud.TLS-acmeSuppliedPreliminary-<snip>-start[528]: Done creating a self signed certificate
Oct 29 13:58:26 nixos nixcloud.TLS-acmeSuppliedPreliminary-<snip>-post-start[728]: cp: cannot stat '/tmp/server.key': No such file or directory

Really weird. The ExecStart didn't fail, so server.key should be there

@fgaz
Copy link
Collaborator Author

fgaz commented Nov 8, 2020

Wild guess: when PermissionsStartOnly was deprecated, it was changed to have the same semantics as adding the + prefix to everything except ExecStart. This would mean that the PrivateTmp (acmeSuppliedPreliminary sets it in addition to PermissionsStartOnly) is now ExecStart-specific, breaking the service

@fgaz
Copy link
Collaborator Author

fgaz commented Nov 8, 2020

If that's the case, this could be fixed by using RuntimeDirectory or tmpfiles instead.

@fgaz
Copy link
Collaborator Author

fgaz commented Nov 21, 2020

Yes, setting RuntimeDirectory and using $RUNTIME_DIRECTORY instead of /tmp in services/TLS does the trick! I'll open a pr

@nh2
Copy link

nh2 commented Dec 26, 2020

@fgaz What came of this?

@fgaz
Copy link
Collaborator Author

fgaz commented Dec 27, 2020

@nh2 I fixed it but forgot to send the patch. Thanks for reminding me, here it is: #74

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 a pull request may close this issue.

2 participants