tmountain's reply has the best direct response to the issue you ran into. Check it out, it's a one-liner. :)

I think video resources are maybe under-emphasized in talk about Nix on HN, and they're important for people who prefer that modality, so I've compiled a list of videos on Nix that I have watched and feel might be helpful for learning it.

There is no comprehensive YouTube series that I can recommend, but you can find really good introductory and overview videos in the form of past conference lectures in the NixCon and NixOS channels on YouTube.

NixCon: https://youtube.com/@NixCon

NixOS: https://youtube.com/@NixOS-Foundation

Here are some playlists and direct references to educational material on Nix and NixOS that I've actually watched. Taken together, they will at least outline all of the normal stuff you might want to do on NixOS, from configuring your system to writing packages to (if you want) leveraging flakes to running your own binary cache.

Reading Nix Expressions (Zimbatm, NixCon 2019) — https://youtu.be/61MuMY9XFNo

Nix: Why and How It Works (Graham Christensen, NixCon 2019) — https://youtu.be/lxtHH838yko

Fearless Tinkering: How NixOS Works (Graham Christensen, NixCon 2019) — https://youtu.be/DK_iLg2Ekwk

Learning the Nix Store Layer (John Ericson, NixCon 2022) — https://youtu.be/utQf4VH7QMw

Overrides: In and Out (Graham Christensen, NixCon 2019) — https://youtu.be/6VepnulTfu8

Nix Flakes in Production: What, Why, and How (Alexander Bantyev, NixCon 2020) — https://www.youtube.com/watch?v=o1Y7rWrPEO8

Nixpkgs Overlays: A place for all excluded packages (Nicolas B. Pierron, NixCon 2017) — https://www.youtube.com/watch?v=W85mF1zWA2o

The Architecture and History of Nixpkgs (Jon Ringer, Summer of Nix 2022) — https://www.youtube.com/watch?v=TKgHazs3AMw

Hydra, Nix's CI (Thomas Bereknyei a.k.a. tomberek, Summer of Nix 2022) — https://www.youtube.com/watch?v=AvOqaeK_NaE

There's also some really good content outside of the official NixOS YouTube channels! See below.

Informal intro to the Nix language, derivations, and Nixpkgs (Silvan Mosberger, from a Nix onboarding for another Tweag employee, recorded 2022): https://www.youtube.com/watch?v=9DJtHIpdp0Y

Burke Libby's Nixology series — https://youtube.com/playlist?list=PLRGI9KQ3_HP_OFRG6R-p4iFgM...

NixOS 101: Introduction to a Different Type of Linux Distro (Tweag onboarding document, 2022) — https://www.youtube.com/watch?v=pfY9Hc_zChs

Introduction to NixOS (Charles Strahan, NYLUG Presents 2017) — https://www.youtube.com/watch?v=VivXSoovUFI

Nix Flakes 101 (Jörg Thalheim a.k.a. Mic92, rC3 2020) — https://www.youtube.com/watch?v=QXUlhnhuRX4

Why NixOS: An Introduction (Ingolf Wagner, rC3 2020) — https://www.youtube.com/watch?v=0eTgQaNiRF0

Sane System Management with NixOS (Tim Steinbach, LambdaConf 2020) — https://www.youtube.com/watch?v=_LDzO5_d1a0

Nix for Functional Systems (Brian McKenna, YOW! LambdaJam 2017) — https://www.youtube.com/watch?v=mIxtBVKo7JE

There are others out there which I didn't list because I've never watched them, and there are probably some older ones I did enjoy which I was unable to dig up. It's probably really only worth watching one or two of the generic, overview, intro-type videos. But there are plenty of them, so feel free to decide within a few seconds whether one clicks with you, and choose it based on that. FWIW, I think Charles Strahan's NixOS intro video is my favorite of that type.

If you really want a comprehensive lecture playlist, the curriculum I recommend is:

1. Charles Strahan's intro to NixOS
2. Burke Libbey's Nixology series (because his videos are relatively short)
3. The listed NixCon and Summer of Nix videos
4. Mic92's Flakes 101

After that, the world's your oyster and you'll definitely know what to search for in the written documentation whenever you need a proper reference.

NixCon videos not listed here can be useful for pointing you to interesting, new or important ancillary and third-party projects in the ecosystem. :)