I have coupled my personal nix configuration (packages, overlays) to my nixos machine-level config by setting users.users.dan.packages appropriately, and I am not yet altogether certain I like it.

Upside: now I can run sudo nix-channel --update && sudo nixos-rebuild switch on any of my machines and it takes care of all my personal preferences.

Downside: seems a bit unwieldy doing the whole git commit/push/rebuild just to add a package to my profile. But I guess nix-env -i still works exactly as it ever did

in reply to Daniel Barlow

@dan I do something similar, and it does feel a bit over the top. I did this mainly out of frustration that there doesn't appear to be a user-specific configuration.nix that I can define packages to be available (falling back on nix-env -i feels bad in an unspecified way, like why am I using nix then...)

self reply

in slightly more detail: given that dan.nix is something like https://gist.github.com/telent/ad51b7a11e35eadd55ba8c4ea67b8338

then my configuration includes the line

users.users.dan = import ./users/dan.nix { inherit pkgs; };

The eagle-eyed will note that I have an environment variable to override the telent-nixpkgs channel/tarball so I can test stuff out more easily - though still not without sudo - if I'm on a machine which has the repo checked out already

dan.nix

GitHub Gist: instantly share code, notes, and snippets.

Gist