nix.dev icon indicating copy to clipboard operation
nix.dev copied to clipboard

flakes tutorial

Open mhwombat opened this issue 2 years ago • 10 comments

Perhaps this tutorial would be useful to others. Comments and criticisms are welcome.

mhwombat avatar Mar 16 '22 14:03 mhwombat

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

github-actions[bot] avatar Mar 16 '22 15:03 github-actions[bot]

I have read the CLA Document and I hereby sign the CLA

mhwombat avatar Mar 16 '22 16:03 mhwombat

recheck

mhwombat avatar Mar 16 '22 16:03 mhwombat

I'm a complete flake n00b. This is a good read, but it needs to go further:

  • I'd like to see a few full examples of stuff I can do with flakes. Complete hand-holding, just copy-paste in my terminal and it works. Then I can tweak and play with it to learn.
  • I'm using a stable nixpkgs channel and flakes don't seem to be supported/enabled?

zupo avatar May 01 '22 07:05 zupo

@zupo the following blog post series by @Xe might also be interesting to you: https://christine.website/blog/series/nix-flakes

@mhwombat might also be a good link to add to the "Other Resources" section.

mkroehnert avatar May 01 '22 13:05 mkroehnert

@mhwombat might also be a good link to add to the "Other Resources" section.

Done

mhwombat avatar May 02 '22 16:05 mhwombat

This is really good and only needs polishing. Thank you!

A few general points:

We still need a section showing how to enable flakes. I updated the NixOS Wiki article - we could link to it or copy it verbatim.

While we haven't decided on this yet, I strongly suggest wrapping lines at sentence boundaries.

All of the things I commented on also hold true for the Wiki article. In addition, we have to reduce redundancy to avoid confusing people with overlapping (and worst: inconsistent) information. Therefore it would be awesome if you could take care of the article after this PR is merged, and update it in the same vein: link to this tutorial, remove redundant sections and additional resources. Possibly, if you want to take the time, add information from the external resources so we can eventually centralize all that knowledge.

fricklerhandwerk avatar Aug 11 '22 02:08 fricklerhandwerk

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/usability-study-session-2/21400/1

nixos-discourse avatar Sep 09 '22 10:09 nixos-discourse

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/usability-study-session-1/21398/1

nixos-discourse avatar Sep 09 '22 11:09 nixos-discourse

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/usability-study-session-4/21422/1

nixos-discourse avatar Sep 23 '22 12:09 nixos-discourse

I would greatly appreciate using this tutorial. Thanks for leading the charge into teaching flakes on nix.dev @mhwombat !

ghost avatar Oct 03 '22 16:10 ghost

@fricklerhandwerk should we close this since we aren't documenting flakes?

zmitchell avatar Jun 20 '23 23:06 zmitchell

I agree we should close this, but not only because we're not putting dedicated effort into documenting experimental features, but because we should approach this differently. In it's current form the diff to the reference documentation is minimal, and the value added here could be folded into the Nix manual.

fricklerhandwerk avatar Jun 21 '23 06:06 fricklerhandwerk