- Notifications
You must be signed in to change notification settings - Fork0
Nix package for Offen web analytics
ngi-nix/offen
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository provides a Nix flake to runOffen, afair and open web analytics tool. It provides the Offen server as a Nix packageas well as a NixOS module to run it as a systemd service.
Using flake support in Nix you can run Offen by directly pulling & executing theflake. You should provide some basic environment variables for a database, e.g.sqlite:
export OFFEN_DATABASE_DIALECT=sqlite3export OFFEN_DATABASE_CONNECTIONSTRING=$(pwd)/offen.dbnix run github:ngi-nix/offen
Or run the demo to see Offen in action without setup:
nix run github:ngi-nix/offen demo
If you want to use Offen on a NixOS server, you can use the module provided bythe flake. Provided you have added the flake as an input calledoffen
, you canmerge this code into your configuration:
{imports=[offen.nixosModules.offen];nixpkgs.overlays=[offen.overlay];services.offen.enable=true;}
Have a look atmodules/offen.nix
for a documentation of available settings.
Use the shell definition in the flake to get a development environment thatcontains all packages required to build and work on the flake:
nix-shell
If you usedirenv, an.envrc
is provided in therepository.
The Nix expressions for the JS packages are generated automatically usingnode2nix. So when updating the Offendependency, these need to be regenerated using the supplied script:
nix flake update --update-input offen-srcscripts/update-node-packages.sh