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

gitea: init at 1.2.1 #30528

Merged
merged 2 commits into from Oct 20, 2017
Merged

gitea: init at 1.2.1 #30528

merged 2 commits into from Oct 20, 2017

Conversation

disassembler
Copy link
Member

@disassembler disassembler commented Oct 18, 2017

Motivation for this change

adds gitea package and service module

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
    • 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/)
  • Fits CONTRIBUTING.md.

@bjornfor
Copy link
Contributor

Could gitea share NixOS module with gogs? If we had "services.gogs.package = gogs|gitea"?

@disassembler
Copy link
Member Author

disassembler commented Oct 18, 2017

It's a possibility at this point, but I'd be wary the further the fork diverges, the more things would be different. In this particular case, the systemd pre-start script needed to copy some locales over into the state directory to get the service to run. I also don't think upstream has any intention on keeping compatibility with gogs going forward.

config = mkIf cfg.enable {

systemd.services.gitea = {
description = "gitea (Gitea Service)";
Copy link
Contributor

Choose a reason for hiding this comment

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

Bikeshed: "Gitea self-hosted Git Service"?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

done

description = "Gitea Service";
home = cfg.stateDir;
createHome = true;
shell = pkgs.bash;
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this user need a shell? (I don't think I've seen that option being used for daemon users before.)

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch, copied the old module. This is gone and it still works.

Copy link
Contributor

@bjornfor bjornfor left a comment

Choose a reason for hiding this comment

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

Looks good.

@betaboon
Copy link
Contributor

hello fellow nixtronauts,

I opened a gitea PR a while ago: #28851
It has some more fine grained config (eg forcing repositories to be private, disabling registration etc).
I think it still has value to add but i currently don't have the time to clean it up.

just wanted to let you know.

@orivej orivej mentioned this pull request Nov 2, 2017
8 tasks
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

5 participants