Hi,
I’m a bit overwhelmed on how to use Nix package manager on my system. Now that might sound silly, but bear with me ![]()
I absolutely love Nix and don’t want to spark any holy war here. My approach is purely practical and I use what is more convenient regardless whether it solves actual problems or brings other issues.
I want to manage my nix packages on non-NixOS using a single git repo that controls what is installed, gives me a convenient way to customize packages (overrides, like PAM shimming) and for some packages allow to configure them declaratively. My rough understanding of options I have is below:
- nix-env - this is the “rolling-distro” channel way to do it - can I just have a repo to declare my packages with just nix-env?
- flakes - this is just nix profile and dependency lock (like rust Cargo.lock, requirements.txt in python etc). I immediately went this way because of how
nix shellworks (I understand thatnix-shellis for development and requires reproducible bash env, but I’m looking for a way to run a temporary package I don’t want to keep and I want it to run in my comfy zsh setup). My current flow is I have a repo with my poor man’s flake, that declares a bunch of packages, a bunch of overrides. whenever I modify this flake I issuenix profile upgrade myflakeand changes are reflected in my system. this mostly works fine, but I have no idea how can I manage configuration of each package this way and from time to time I issue nix profile add nixpkgs#something and forget about it
- home manager - I havent tried this approach for two reasons: first I don’t want to manage all my dotfiles with nix (yet). too much overhead to port them. another reason is that even Home Manager docs mention it brings some serious complexity to the table and debugging is non-trivial often.
I’m looking both for advice which way is more optimal and for examples of how you guys do this.
Is anyone using a single flake to manage nix packages as with Home Manager? I’d love to have a peek ![]()
Are you doing same thing without flakes and find it optimal - please show me!
Anyone rocking a home manager setup that takes care of just a couple of dotfiles and rest is managed old fashioned way (git repo, homesick etc)?