this post was submitted on 10 Nov 2025
8 points (83.3% liked)

Nix / NixOS

2513 readers
21 users here now

Main links

Videos

founded 2 years ago
MODERATORS
 

Almost every NixOS tutorial I encounter, be that blog or video, says to use Flakes and Home Manager. While that definitely speaks to the value of these tools, I find myself, instinctually, wanting to avoid them. I’ve attempted to get them working multiple time, and encountered more issues than they solved, for me. I interpret this to mean my knowledge and/or use case of NixOS is not ready for me to use these tools effectively. On top of that, something about a set of files that could all be put into a single unified config appeals to me (which flakes/hm can probably do too, but hopefully to get my vibe).

My reasoning aside, this has made me curious if there is some way for me to “backport” all these configs I encounter into my set of more default style configs. The primary goal I have that lead me to this is rootless Podman and declaring my containers in the config. If anyone has any guidance or resources you could point me to it would be much appreciated.

you are viewing a single comment's thread
view the rest of the comments
[–] rozodru@pie.andmc.ca 4 points 19 hours ago (1 children)

when I first started using NixOS I was like you. I refused to use flakes and the home manager cause it just didn't make sense to me. Then I borked my system royally and had to reinstall. just going off the configuration.nix alone was...it was rough. possible but rough. So I decided to use flake, home manager, along with my configuration and then suddenly NixOS just clicked for me, I finally made sense.

using all 3 just makes your system easier to manage. For example say you use a WM and you want to keep your WM (like niri or hyprland or sway or i3 or whatever) config reproducible just like the rest of your system. Sure you can throw your entire config into the home manager OR you can simply have the home manager literally manage said config. Keep your config files in your "nixos-configs" directory along with your home, flake, and configuration.nix and repo all that, boom it's backed up and easy to reproduce if something goes wrong or you want to move your ENTIRE system to another computer. I do this for Niri, KDE, Yazi, Aerc, DOOM Emacs, Nvim, whatever I have a config for. So say I royally mess up a config for one of those programs or WMs just like my NixOS I can go back to a previous generation of one of them very easily thanks to my home manager.

Flakes are also good in case you want to use something that hasn't been packaged on NixOS. Say like some awesome TUI or application someone recently made you can input the git repo into your flake and then "install" it via your home manager. makes things easy.

It also helps to understand and manage if you sort what each thing does. For me I use my home.nix to list packages that I directly interact with. So stuff like Qutebrowser, floorp, steam, OBS, Krita, etc, etc are all in my home manager. stuff that's more backend/system dependent like git, libnotify, fzf, etc are in my configuration.nix i.e. the config of my OS while the home.nix is just like a package list and config files of things I'm more likely to interact with on a daily basis. It's easier to manage when things are separate like that.

I keep all of this stuff in its own directory that is a git repo. so before I rebuild I stage it all. then rebuild. if it's good commit it all, push it to my forgejo, boom instantly backed up. something goes wrong then I can either roll back a generation or clone the repo and rebuild from that.

[–] Arkhive@piefed.blahaj.zone 1 points 11 hours ago

Lots of good suggestions from people, and replying individually was going to be a mess. Please see the comment I added.