System packages in configuration.nix, user packages in home.nix. I’d say anything that is non-interactive and/or requires root access is a good rule of thumb for system packages. Beyond that I try to use modules for configuring packges and there is usually only one of nixos and home manager options (sometimes there are duplicates).
As for flakes I mostly use it to handle a bunch of different systems from one config and any flake specific configs. I also use standalone flakes for dev environments but that’s not related to the system config.
Not quite sure what you mean here. I normally only configure out-of-tree packages as flake modules (or whatever the term is), and I don’t think there is an official collection/search page for these. It’s mainly that certain packages require it like
lanzaboote
, andhome-manager
for that matter.It sounds like you configured
home-manager
system wide, probably through /etc/nixos/flake.nix, but then called thehome-manager
executable. If you did configure it like this then you do not need to callhome-manager
ever sincenixos-rebuild
etc commands will handle this for you.Typically, it will be configured to follow
inputs.nixpkgs
so packages will use versions of whatever revision is currently pulled. In my system that is:inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
and then you essentially pass that to
configuration.nix
, andhome.nix
.And although you seem to already be using flakes, when you call:
nix flake update
a new revision of input.nixpkgs will be pulled, and so packages configured in configuration.nix will be updated when you next call
nixos-rebuild switch
or whatever you used to update your system.
Refer to: https://nixos-and-flakes.thiscute.world/
if you haven’t already as there is where I got started from for the most part. There’s a lot more detail I missed since nix and flakes are pretty complex (and I don’t fully understand much of it either).