diff --git a/contrib/nix/README.md b/contrib/nix/README.md index 484fcd7b25..40920bfc03 100644 --- a/contrib/nix/README.md +++ b/contrib/nix/README.md @@ -10,11 +10,17 @@ we declare it, then it works. see [sandbox.nix] file for details. it install software on /nix directory, and run service on launchpad(darwin) and systemd(linux). +NOTE: for linux, ensure 'systemd --user' process running. + ## Roadmap -currently i already run all service on mac os. -linux os will be tested and supportd will come sooner. - + +- [X] support mac and linux +- [ ] add environment check script +- [ ] add datahub nix package +- [ ] add datahub[gms, frontend, pipeline] service module +- [ ] add nixops distributed deploy + ## Quickstart 1. install nix and channel @@ -23,20 +29,31 @@ linux os will be tested and supportd will come sooner. sudo install -d -m755 -o $(id -u) -g $(id -g) /nix curl https://nixos.org/nix/install | sh - nix-channel --add https://nixos.org/channels/nixos-20.03 nixos-20.03 - nix-channel --update nixos-20.03 + nix-channel --add https://nixos.org/channels/nixos-20.03 nixpkgs + nix-channel --update nixpkgs ``` 2. install home-manager ``` - nix-channel --add https://github.com/clojurians-org/home-manager/archive/master.tar.gz home-manager - nix-channel --update - nix-shell '' -A install + nix-channel --add https://github.com/clojurians-org/home-manager/archive/v1.0.0.tar.gz home-manager + nix-channel --update home-manager + NIX_PATH=~/.nix-defexpr/channels nix-shell '' -A install ``` 3. setup environment, and well done! ``` - export NIX_PATH=~/.nix-defexpr/channels - home-manager -I home-manager= -f sandbox.nix switch + NIX_PATH=~/.nix-defexpr/channels home-manager -f sandbox.nix switch +``` + +## Client connect +``` +mysql => mysql -u root -S /nix/var/run/mysqld.sock +postgresql => psql -h /nix/var/run postgres +elasticsearch => curl http://localhost:9200 +neo4j => cypher-shell -uneo4j -pneo4j +zookeeper => zkCli.sh +kafka => kafka-topics.sh --bootstrap-server localhost:9092 --list +confluent schema-registry => curl http://localhost:8081 + ``` diff --git a/contrib/nix/sandbox.nix b/contrib/nix/sandbox.nix index 7c88463d04..dd9a74bdb3 100644 --- a/contrib/nix/sandbox.nix +++ b/contrib/nix/sandbox.nix @@ -40,7 +40,6 @@ # package = pkgs.mysql80 ; package = pkgs.mysql57 ; dataDir = "/opt/nix-module/data/mysql" ; - unixSocket = "/opt/nix-module/run/mysql.sock" ; } ; services.elasticsearch = {