https://logs.nix.samueldr.com/home-manager/2020-06-24#3652401;
NIX_PATH=nixpkgs=http://nixos.org/channels/nixos-21.05/nixexprs.tar.xz:home-manager=https://github.com/nix-community/home-manager/archive/release-21.05.tar.gz:nix-on-droid=https://github.com/t184256/nix-on-droid/archive/release-21.05.tar.gz nix repl
nix-repl> hm = import <home-manager/modules> { configuration = ~/.config/nixpkgs/home.nix; pkgs = import <nixpkgs> {}; }
~> hm.config.TAB
Very useful. Thanks for sharing.
Just to explain what is going on here, the $NIX_PATH makes
<nixpkgs>
and<home-manager>
available in the repl. This can also be done with-I
as per the nix repl documentation:I'm using nix flakes, so I wanted a way to load the flake (with
:lf .
) and use its inputs to generate the config within nix repl. In my directory I haveflake.nix
andhome.nix
. Not sure if it's idiomatic, but this works: