Nix profile usecase

I just finished rolling NixOS on all of my desktops/laptops and love it. I took the system flake approach and used all the cool tools like Disko and Home Manager to have a really epic NixOS experience (from single command in minimal-install-cd to a fully functional desktop system that needs zero additional tweaks - this was a shock for me that such thing is even possible). But! :smiley: I have a question about nix profile. I structured my config so I mainly have packages in a nixos modules and only a handful of packages in Home Manager (pragmatic choice of ones that are easier to configure with HM). The only thing left if a bunch of repos with my rust cli tools for work. I’ve seen a fair share of criticism about nix profile, but I think that keeping flake.nix in my rust repos and installing them to nix profile will be very convenient:

  • no need to setup infra (git repos) and reference it in main system flake
  • tools do not change often and no upstream changes happen so I don’t need to track carefully if they are up to date
  • it’s easier to develop and install in one place for me

My question is: am I not missing something? Is there any downside to this approach apart from losing some part of declarativeness? Perhaps there is a better way to do this?

Thanks in advance!

That’s probably not the best use-case. Put your development deps in your various project devshells for a way more consistent experience. If you find yourself using them consistently and not scoped to a project, then they’re best in your HM or system packages. Profile and env are useful in really narrow contexts, mostly non-nixos or non-home-manager ones, such as non-nixos systems running a service unit that has nix deps.

The major downsides to the approach you listed is it undermines the experience you led your post with and will need manual curation instead of integratin with existing tools and processes. They’re imperative and non-reproducible.

Thanks, my main gripe with putting them into packages is that I create a dependency for my system flake that is cumbersome to handle during system installation. I don’t want to setup ssh keys to download a couple of my projects during install - I want to have the flexibility to decide if I need them later, during runtime :slight_smile: