New to NixOS: Questions about flakes and secrets

started by hehe 2026-06-11

Background

I decided to build a homelab setup using NixOS, because I thought it might be cool to learn how to do two things at once. This may be a bit hard-mode for my current technical ability (IT helpdesk with no CS background), but thought it would be fun anyway. I followed Tony's NixOS from scratch tutorial and it worked perfectly fine, but as I dug into things, more questions arose. Talking too long, get to the questions!

Questions

  • Was starting with flakes a bad move for a Nix beginner? Context: From some forums that I've been reading, some people are very opinionated on flakes and some think they are currently in a pretty bad place. They also seem to be handled differently than base nix to the point where Nix docs are almost always divided into Flake and Non-Flake. But flakes seem to be the such great feature that I may miss out if I build completely without them(?)
  • What is the best way of handling secrets currently for both flakes and non-flake? Context: I would like to have things backed up into github/lab or something like that so it would be good to keep references out. I also don't want to build unencrypted secrets into my /nix/store (obv), but encrypting and decrypting seems like a pain versus some other way to reference. Just genuinely lost with many options. Seems like Age is the best(?)
  • Are there some fun starter projects or ideas you can recommend for me to get comfy with nix? Context: I think I'm a bit too fresh to dive into K8s infrastructure, which is also relatively new to me. I've been reading through Nix Pills which is Non-Flake beginner docs, but not really getting my hands too dirty because I see them messing with nix-env which seem impure.

Appreciate the help and feedback!

Log in or register to reply.