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: Add support for the REQUIRE_SIGNIN_VIEW option #57671

Closed
wants to merge 1 commit into from

Conversation

artemist
Copy link
Member

Motivation for this change

The REQUIRE_SIGNIN_VIEW option in gitea is useful for making private git servers, but I didn't originally notice it since there was no option in NixOS.

Things done

Add a new option which maps to REQUIRE_SIGNIN_VIEW.

This is marked as draft, since the gitea tests are failing. However, that is likely not my problem, since they seem to fail on master as well (due to a binary which doesn't support sqlite3).

  • 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.

Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

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

The change itself seems fine 👍 .
Regarding the broken tests: IIRC @ciil debugged some issues with gitea some days ago, they're probably related to the broken tests as well, but I didn't look into the issues here yet.

@@ -263,6 +264,15 @@ in
'';
};

requireSigninView = mkOption {
type = types.bool;
Copy link
Member

Choose a reason for hiding this comment

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

For enable options there's mkEnableOption. If you want e.g. a custom description you can do mkEnableOption "REQUIRE_SIGNIN_VIEW for gitea" // { description = "..." }.

@aanderse
Copy link
Member

@infinisil I'm just wondering what your opinion on option overload is since you've run benchmarks?

Maintaining backwards compatibility is key, but the amount of dislocated documentation this module is gaining is getting unwieldy... and part of the motivation for this PR is simply because an option wasn't documented in NixOS. IMHO this module is perfect candidate for porting the config option to an attrSet (in a backwards compatible way, at least for a few releases) and making it clear that documentation is maintained upstream.

Thoughts?

@ciil
Copy link
Member

ciil commented Mar 15, 2019

9406f24 broke the sqlite test, because the buildFlags as given aren't honored by the go builder. The order of the build flags seems to influence if either PAM or sqlite support is built into the binary. I'm not a go pro, so I haven't yet found a way in which this works, and am currently pretty time constrained. If @artemist wants to look into this, feel free.

@infinisil
Copy link
Member

@aanderse Yeah it would be a good candidate, but so would lots of other services and PRs. I'd rather focus on writing an RFC for it, which I already started with.

@artemist
Copy link
Member Author

A different config system would definitely work well, this is a bit unwieldy. I can confirm that you can still override with extraConfig, as I did in an earlier configuration.

@Ma27
Copy link
Member

Ma27 commented Mar 30, 2019

btw #58584 should fix the broken tests.

@aanderse
Copy link
Member

For reference the RFC is open now: NixOS/rfcs#42

I'm planning on making some changes to the gitea module at some point after #56720 is merged. When I'm making those changes I might find the energy to modify the module to have a config option as described in the mentioned RFC as well.

@aanderse aanderse mentioned this pull request Apr 24, 2020
10 tasks
@stale
Copy link

stale bot commented Jun 1, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@ciil
Copy link
Member

ciil commented Jun 1, 2020

#85904 did indeed incorporate this, closing.

@ciil ciil closed this Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants