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/gitea: Support SMTP without pw in the store #64741

Merged
merged 1 commit into from
Jul 20, 2019
Merged

nixos/gitea: Support SMTP without pw in the store #64741

merged 1 commit into from
Jul 20, 2019

Conversation

dasJ
Copy link
Member

@dasJ dasJ commented Jul 14, 2019

Motivation for this change
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 nix-review --run "nix-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 Jul 14, 2019
Copy link
Member

@spacekookie spacekookie left a comment

Choose a reason for hiding this comment

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

This looks really cool 👍

@aanderse
Copy link
Member

@GrahamcOfBorg build nixosTests.gitea

@aanderse aanderse requested review from Ma27 and etu July 18, 2019 00:46
@aanderse
Copy link
Member

@dasJ Thanks for contributing this.

@etu @Ma27 @kolaente @dasJ Someone here must be a go programmer, right? Think about how much our preStart script could be cleaned up if someone went ahead and finished implementing secret storage as per go-gitea/gitea#4860 (comment) Any takers?

@dasJ
Copy link
Member Author

dasJ commented Jul 18, 2019

@aanderse you know what would scale a lot better? Something like this:

[gitea]
EXTRA_CONFIG_FILES = /var/lib/gitea/secrets.conf,/var/lib/secrets/gitea/smtp.conf

@aanderse
Copy link
Member

@dasJ For sure. That's the title of the issue I just linked, as you have seen. I'm not asking anyone here to join the gitea dev team, though. I'm just saying that someone with sufficient go experience could probably replicate for other secrets what was done for the one.

But if you're really keen or know someone on the gitea team... please do! 😆

@kolaente
Copy link
Member

@aanderse @dasJ As it currently stands, we'll switch to a different library for config file handling rather sooner than later since the one we're using currently (go-ini) has issues. While it would absolutly be possible to "quickly hack something together" to load more secrets from files, I would prefer to tackle this once we got rid of go-ini to do it properly/for more use cases.

(I'm one of the Gitea devs)

Copy link
Member

@aanderse aanderse left a comment

Choose a reason for hiding this comment

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

LGTM 👍
@dasJ Thanks again!

@aanderse aanderse merged commit 30920fb into NixOS:master Jul 20, 2019
@dasJ dasJ deleted the gitea-smtp-pw branch July 21, 2019 18:07
@schmittlauch
Copy link
Member

@dasJ I'm a bit surprised that it is possible to supply an SMTP password for the mailer, but no other required configs like the actual SMTP server to use or the username.
Are folks expected to configure this via services.gitea.extraConfig or what's the idea here?

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.

5 participants