Find a file
2023-07-09 14:46:22 +02:00
modules Initial NixOS module 2023-07-09 14:46:22 +02:00
node wip: use nixos-unstable 2023-06-05 19:19:43 +02:00
python wip: cleanup, more docs 2023-06-12 15:28:17 +02:00
scripts Separate apps and assets 2023-06-03 10:24:05 +02:00
srcs wip: use nixos-unstable 2023-06-05 19:19:43 +02:00
test-vm Initial NixOS module 2023-07-09 14:46:22 +02:00
.envrc wip: cleanup, more docs 2023-06-12 15:28:17 +02:00
.gitignore wip: cleanup, more docs 2023-06-12 15:28:17 +02:00
erpnext-package.json wip: assets 2023-05-20 23:36:21 +02:00
erpnext-yarn.lock wip: assets 2023-05-20 23:36:21 +02:00
flake.lock wip: cleanup, more docs 2023-06-12 15:28:17 +02:00
flake.nix wip: cleanup, more docs 2023-06-12 15:28:17 +02:00
frappe-package.json wip: assets 2023-05-20 23:36:21 +02:00
nginx-erpnext-conf.nix wip: working vm 2023-06-07 21:58:05 +02:00
overlay.nix wip: cleanup, more docs 2023-06-12 15:28:17 +02:00
python-overlay.nix wip: cleanup, more docs 2023-06-12 15:28:17 +02:00
README.md wip: cleanup, more docs 2023-06-12 15:28:17 +02:00

Erpnext on NixOS

Cachix

Using the https://pub-solar.cachix.org binary cache:

cachix use pub-solar

Or manually add the following lines to your ~/.config/nix/nix.conf:

substituters = https://cache.nixos.org/ https://pub-solar.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= pub-solar.cachix.org-1:ZicXIxKgdxMtgSJECWR8iihZxHRvu8ObL4n2cuBmtos=

Pushing to the https://pub-solar.cachix.org binary cache (in this example, we push the package run-erpnext and its dependencies):

nix develop
nix build --json .#run-erpnext \
  | jq -r '.[].outputs | to_entries[].value' \
  | cachix push pub-solar

NixOS VM

nix build '.#nixosConfigurations.test-vm.config.system.build.vm'
./result/bin/run-nixos-vm

# In the VM, use root & empty password to login
# Watch erpnext startup:
# journalctl -fu erpnext.service
# Open http://localhost:8081 in your browser
# User: Administrator
# Password: admin

Docker

docker run -d --name erpnext-redis-socketio -p 12311:6379 redis:latest
docker run -d --name erpnext-redis-queue -p 6379:6379 redis:latest
docker run -d --name erpnext-db -p 3306:3306 -e MARIADB_ROOT_PASSWORD=password -e MARIADB_DATABASE=erpnext -e MARIADB_USER=erpnext -e MARIADB_PASSWORD=erpnext mariadb:latest --collation-server=utf8mb4_unicode_ci

nix build .#run-erpnext
./result/bin/run-erpnext

# new terminal
nix shell nixpkgs#nginx
nginx -c /tmp/erpnext/nginx-erpnext.conf -g "daemon off;"
# http://localhost:8081
# User: Administrator
# Password: admin