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: make use of declarative features where applicable #61923

Merged
merged 3 commits into from Jun 12, 2019

Conversation

@aanderse
Copy link
Contributor

commented May 23, 2019

Motivation for this change

I threw this together quickly so haven't really given any thought into how this would impact upgrading existing installations. I just wanted to get the code out there so I could get some feedback sooner rather than later. Feedback (positive or negative) appreciated.

NOTE: Best to review this commit by commit. If you think this should be broken up into multiple PRs I probably agree with you and can do so.

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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@Ma27

This comment has been minimized.

Copy link
Member

commented May 23, 2019

The patches itself seem fine, I'll do some testing on one of the next weekends unless one of the other maintainers is faster :)

@flokli

This comment has been minimized.

Copy link
Contributor

commented May 23, 2019

@aanderse aanderse force-pushed the aanderse:gitea branch from 1e4f088 to 768ca77 May 23, 2019

@aanderse

This comment has been minimized.

Copy link
Contributor Author

commented May 23, 2019

The patches itself seem fine, I'll do some testing on one of the next weekends unless one of the other maintainers is faster :)

@Ma27 I'm planning on testing this on an existing instance running mysql. Do you happen to have an existing instance running postgresql to test on?

@aanderse aanderse force-pushed the aanderse:gitea branch from 768ca77 to 178cdb9 May 24, 2019

@aanderse

This comment has been minimized.

Copy link
Contributor Author

commented May 24, 2019

Updated code to add more declarative goodness via systemd.tmpfiles.rules (symlink).

@Ma27

This comment has been minimized.

Copy link
Member

commented May 24, 2019

Do you happen to have an existing instance running postgresql to test on?

It's on my todo list to move several self-hosted services (including gitea) from sqlite to postgresql.
I'll probably have sufficient time this weekend, then I'd test the setup with this patch :)

@aanderse aanderse force-pushed the aanderse:gitea branch from 178cdb9 to bb0b359 May 24, 2019

@flokli

flokli approved these changes May 24, 2019

@aanderse

This comment has been minimized.

Copy link
Contributor Author

commented May 24, 2019

@GrahamcOfBorg test gitea.mysql gitea.postgres gitea.sqlite

@aanderse

This comment has been minimized.

Copy link
Contributor Author

commented May 25, 2019

It's on my todo list to move several self-hosted services (including gitea) from sqlite to postgresql.
I'll probably have sufficient time this weekend, then I'd test the setup with this patch :)

@Ma27 That would be great. I haven't completely convinced myself this won't break existing postgresql installs, so if you migrate from sqlite to postgresql and then upgrade to this module that would be awesome. Please note that depending on if you're running master or not you may have to modify the database.socket value as it could either be in /tmp or /run/postgresql.

@aanderse

This comment has been minimized.

Copy link
Contributor Author

commented May 28, 2019

@artemist If you're available for review and/or testing I would appreciate.

@aanderse aanderse force-pushed the aanderse:gitea branch from bb0b359 to 58e51de May 29, 2019

@aanderse aanderse marked this pull request as ready for review May 29, 2019

@nixos-discourse

This comment has been minimized.

Copy link

commented May 29, 2019

This pull request has been mentioned on Nix community. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review-may-2019/3032/3

@Ma27

Ma27 approved these changes Jun 3, 2019

Copy link
Member

left a comment

Deployed the patches onto a gitea instance with postgresql running and an existing data set and didn't encounter any issues, so 👍

nixos/modules/services/misc/gitea.nix Show resolved Hide resolved
nixos/modules/services/misc/gitea.nix Show resolved Hide resolved

@aanderse aanderse force-pushed the aanderse:gitea branch from 58e51de to 7145cf2 Jun 11, 2019

@aanderse

This comment has been minimized.

Copy link
Contributor Author

commented Jun 11, 2019

@GrahamcOfBorg test gitea.mysql gitea.postgres gitea.sqlite

@aanderse

This comment has been minimized.

Copy link
Contributor Author

commented Jun 11, 2019

@Ma27 if you feel I've adequately addressed your most recent comments please feel free to merge as after you reported back on testing I feel this is ready.

Thanks everyone!

@Ma27

This comment has been minimized.

Copy link
Member

commented Jun 12, 2019

Had a final look, with passing tests and having this tested with actual data I guess this should be fine now 👍

@Ma27 Ma27 merged commit 401360e into NixOS:master Jun 12, 2019

16 checks passed

Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
nixosTests.gitea on aarch64-linux Success
Details
nixosTests.gitea on x86_64-linux Success
Details
tests.gitea.mysql, tests.gitea.postgres, tests.gitea.sqlite on aarch64-linux Success
Details
tests.gitea.mysql, tests.gitea.postgres, tests.gitea.sqlite on x86_64-linux Success
Details
@Ma27

This comment has been minimized.

Copy link
Member

commented Jun 12, 2019

@aanderse thanks!

@aanderse

This comment has been minimized.

Copy link
Contributor Author

commented Jun 12, 2019

Thanks to all for feedback, review, and testing!

@aanderse aanderse deleted the aanderse:gitea branch Jun 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.