Agreed, but perhaps they should officially adopt home-manager then? It felt strange to me that the best way to be using nix was a separate community project.
http://chriswarbo.net/git/nix-config/git/branches/master/ove...
You could theoretically use Nix for managing user apps too, but that's a niche use case and (as you found out) not in a working state.
{
pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/cd63096.tar.gz") { }
} :
with pkgs;
let
mypackage = callPackage ./mypackage.nix { stdenv = stdenv; python = python3; };
in
dockerTools.buildImage {
contents = [ mypackage ];
}
You then write a package definition in mypackage.nix, following the template of packaging things in nixpkgs.(Dev environments work in a similar fashion except with mkShell instead of dockerTools.buildImage.)
I haven't used Nix flakes but I think it develops this simple idea further.