Anatomy of a NixOS Config - Part 1/2
ฝัง
- เผยแพร่เมื่อ 5 มิ.ย. 2024
- Part 1 of 2 in a description of the structure of my multi-user, multi-system NixOS configuration. This video gradually builds out a visual diagram of the structure while explaining the purpose of each part and how they all fit together.
Already available: • Video
OUTLINE
0:00 Introduction
1:10 Central staging area
2:15 Inputs
4:09 Outputs overview
4:26 Custom modules
5:09 Pathing clarification
5:25 Overlays
6:22 Custom packages
8:33 DevShell
9:25 Formatter
9:58 Wrap-up and link to part 2
SUPPORT
ko-fi.com/unmovedcentre
ADDITIONAL MATERIAL
- My nix-config on GitHub: github.com/EmergentMind/nix-c...
- A related article on my website Unmoved Centre: unmovedcentre.com/technology/...
CONNECT
- Subscribe to this TH-cam channel
- My website: www.unmovedcentre.com
- X / Twitter: / emergent_mind
- GitHub: github.com/EmergentMind
- GitLab: gitlab.com/emergentmind
EXTERNAL REFERENCES
Other people's configs reference in the video:
- Mysterio77 Starter Template: github.com/Misterio77/nix-sta...
- Mysterio77 Personal Nix-Config: github.com/Misterio77/nix-config
- Eric Tossel's nixflakes repo: github.com/erictossell/nixflakes
Official documentation referenced in the video:
- NixOS Manual: nixos.org/manual/nixos/stable...
- NixPxgs Manual, Overlays chapter: nixos.org/manual/nixpkgs/stab... - วิทยาศาสตร์และเทคโนโลยี
I love nixos, but i have no coding experience so learning nixos is definitely an experience.
You need to have some understanding of functional programming, eg. Haskell, as Nix is a functional language.
@@marcuswest4572 or I could learn as I go, which is what I am doing and enjoying.
Just try it, get your hand dirty. Nix is also my first programming language that I learn :)
Currently trying to move from Windows to NixOS and your videos are helping me a TON. I do use Linux for work but I still don't know much, and for distros as unique as NixOS high quality informative videos like this are lifesavers. Thank you so much!
Thanks for the kind compliment. I'm glad to help. More content is on the way in coming weeks.
Been using Nixos for about 3 months and still have so much to learn. This quality of a resource, if continued will certainly be tremendously helpful to all.
Thanks for watching and for the kind compliment! There is more content coming.
Great video, very informative, thanks for posting this up!
Glad it was helpful!
Killer intro, crystal clear! Thanks 🙏 I’m migrating to flakes on a new laptop and I’ll follow your structure which seems to have great sense. I was looking at some config examples in the past days trying to make sense of them, so your videos are godsend 🙌
It's probably one of the most useful videos about nixos configs
Thanks for the kind compliment!
Thanks for the great information.
Thanks for the feedback.
Thank you for making these videos, please continue to make more, in future videos would be really cool to reference offficial Nix* docs and linking your builds to the docs so that way we can learn how to read the docs and build at the same time 😀
Thanks for watching and for the comment! That's a good suggestion. You may also know that there is finally an official wiki at wiki.nixos.org/ so I will likely reference that as well. I have a few ideas for showing the reference process in the videos to help out as well.
love the casual nyx assassin 😂
Great presentation style, VERY helpful diagrams, and perfect level of detail. I am a NixOS newbie, with 1 month of daily driving so far. Basic config with no flakes and no-home manager. I (and I am sure others) would really love your opinion (and video) how to migrate to the well designed, future-proof structure, without having to re-do from scratch. First introduce basic starting flake and home-manager? Then introduce your patterned structure? Starting from scratch feels like a major step backwards. Is gradual introduction feasible? Keep the videos coming. Much needed for us NixOS NOOBS.
Thank you for the excellent comment!
A gradual migration to this sort of structure is certainly possible but I can see that, without knowing where to put the various pieces, it could feel like a slog or step backwards.
In the future I would like to put something together based on your suggestion of starting with a very basic config and gradually migrating towards the structure. I've added it to my plans. No idea on time frame for release though. I have some other content planned sooner but knowing that there is demand for something specific is excellent feedback for me.
Glad you're enjoying my work and thank you for the encouraging support.
Thank you for thisnusefull information!
Please use zoom/larger fonts when typing commands or showing files, I would like to see and read the text from 3m from sofa 😋
Thank you for the feedback!
I've just released a new set of NixOS videos and increased terminal size significantly. Let me know if that is enough of an improvement for you.
Top top quality. A larger presentation would be easier
Thank you for the feedback!
I've just released a new set of NixOS videos and increased terminal size significantly. Let me know if that is enough of an improvement for you.
@@Emergent_Mind It's much better yes
posting this on stacker news!
Ha! just saw the Nyx from Dota2
Great video, subscribed! I recently migrated from my misterio based config to using snowfall-lib. Have you seen snowfall-lib, do you have any thoughts? I loved how much it reduced the boilerplate in my flake.
Hi I had a look at snowfall-lib after reading your comment. Looks like an interesting project that I'll have to do some more exploration into. My primary hesitation with libraries like that is that it can be difficult to understand what they're doing under the hood. That's just my personal preference of course and may not be the case with snowfall, but I'll have a deeper look.
@@Emergent_Mind No I think its a very fair point! Its all about trade-offs. There is also an issue about maintenance etc etc.
Nice, what did you use to generate the diagrams?
Thanks for watching. The diagrams are all done in draw.io for the time being.
nix nix nix!
tix! tix! tix!
Are you Brent from Linux Unplugged/Jupiter Broadcasting? I swear you sound just like him.
Not me, but thanks for asking :)
Friendly reminder to always have a human manually check AI subtitling. Not wanting to do that is perfectly reasonable, but generating subtitles and not checking them means they’re currently roughly on par with what TH-cam autogenerates, and in future will be worse than what TH-cam autogenerates.
Thanks for pointing this out! I have started to edit the captions for existing videos and will include it as a step when posting future videos.