Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This will add support for nix flakes. Which really helps with my development on nixos. This has two basic parts: 1. DEVELOPMENT After this you can use the following commands on computer with nix and a patched version of direnv: direnv allow devenv up And it will automatically start and instance of postgresql and mosquitto for development. And the environment variables are already configured for teslamate. So then can start teslamate with: npm install --prefix ./assets && npm run deploy --prefix ./assets iex -S mix phx.server This part is all working as designed. And pretty simple and straight forward. 2. NIX PACKAGE OF TESLA This is 99% complete, but some pain points I haven't addressed yet. Because I don't yet know of good solutions. * node2nix really does not like having "package.json" refer to file installed from mix. For my packages I changed it to pull the files from npm. But need to keep the versions in sync with mix. I filled a bug report on this: svanderburg/node2nix#323 * node2nix needs to be run every time assets/assets/package-lock.json is updated. Yuck. * There is a checksum in flake.nix that needs to be updated whenever mix.lock changes.
- Loading branch information