DeterminateSystems / zero-to-nix

Zero to Nix is your guide to learning Nix and flakes. Created by Determinate Systems.
https://zero-to-nix.com
Other
855 stars 64 forks source link

correct path to go flake template #360

Closed hampgoodwin closed 1 month ago

hampgoodwin commented 1 month ago

Summary

I was following the zero to nix website and got to section 3 "From a local flake" https://zero-to-nix.com/start/nix-develop#flake. I selected go and used the command. I believe the path to the go template referenced in the root flake.nix was incorrect. I cloned it, and tried to run

nix flake init -t "../github.com/hampgoodwin/zero-to-nix/flake.nix#go-dev"

and got

path '/home/hamp/github.com/hampgoodwin/zero-to-nix/flake.nix' does not contain a 'flake.nix', searching up
warning: Git tree '/home/hamp/github.com/hampgoodwin/zero-to-nix' is dirty
error: opening directory '/nix/store/40a8q71915rhvpy4crc6ifvzz8m5xlm0-source/nix/templates/dev/go': No such file or directory

With the change herein and running the same I was able to get a templated flake.

netlify[bot] commented 1 month ago

Deploy Preview for zero-to-nix ready!

Name Link
Latest commit 41ea766d05e1ec49d55434e8081df611ba84d5dd
Latest deploy log https://app.netlify.com/sites/zero-to-nix/deploys/66b144cb6d723200085d0419
Deploy Preview https://deploy-preview-360--zero-to-nix.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.