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/matomo: point path.geoip2 outside of the nix store. #100617

Merged
merged 1 commit into from Feb 16, 2022

Conversation

OlivierMarty
Copy link

@OlivierMarty OlivierMarty commented Oct 15, 2020

path.geoip2 pointed to the nix store which is read only. Matomo fails to
download geoip database. See #64759.

Motivation for this change

By default matomo config path.geoip2 points to the nix store. One can setup geolocalisation from the UI, but the download would fail because the nix store is read-only. See #64759.
This PR changes the path to point to the matomo state directory, allowing one to enable the matomo service and then configure the geolocalisation from the matomo UI without pain.

Note that there are already some efforts to build a geoip database (e.g. #73767), but matomo can also handle it for simpler set-ups.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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 requested review from florianjacob and Kiwi October 15, 2020 16:48
@OlivierMarty OlivierMarty changed the title nixos/matomo: point geoip outside of the nix store. nixos/matomo: point path.geoip2 outside of the nix store. Oct 15, 2020
Copy link
Member

@sorki sorki left a comment

Choose a reason for hiding this comment

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

I've tested this and it fixes the issue, downloads DBIP file correctly and can be enabled right after.

CC @Kiwi @florianjacob

@robertoschwald robertoschwald mentioned this pull request Feb 19, 2021
10 tasks
path.geoip2 pointed to the nix store which is read-only. Matomo was
failing to download a geoip2 database. See NixOS#64759.
@OlivierMarty
Copy link
Author

@Kiwi @florianjacob could you maybe take a look? Thank you!

Copy link
Member

@ThibautMarty ThibautMarty left a comment

Choose a reason for hiding this comment

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

LGTM

This is needed when setting up geolocation from the UI, but also if one downloads GeoIP2 databases in /var/lib/matomo/misc (I do that with a custom systemd service but #121145 can certainly work too now).

nixos/modules/services/web-apps/matomo.nix Show resolved Hide resolved
@stale
Copy link

stale bot commented Jan 8, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 8, 2022
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Feb 12, 2022
@abbradar
Copy link
Member

LGTM. If noone objects, let's merge this in a few days.

@abbradar abbradar merged commit 7852ea1 into NixOS:master Feb 16, 2022
@OlivierMarty
Copy link
Author

Thank you!

@OlivierMarty OlivierMarty deleted the matomo branch February 17, 2022 09:41
sorki added a commit to fix-all-the-things/om-ops that referenced this pull request Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants