Closed qrilka closed 4 years ago
@qrilka Thanks for the report. I haven't tested it on non-NixOS systems. Is there any error message when you run it?
I just tried it on Ubuntu 18.04 and it worked:
$ which fortune
/home/ryantm/.nix-profile/bin/fortune
Actually I found a reason after I filed this issue but had no time to test it out before now - the problem is about my terminal emulator - home-manager
fails because of missing terminfo. With that fixed I was able to switch now and my config is in https://github.com/qrilka/home
Could I ask you a side question? Will this template still be needed when flakes will be merged into stable?
@qrilka It will be possible to simplify it at the very least. It might be possible to make a flake repo that you invoke directly from Nix on a directory with a home.nix file in it. I should play around with that later :)
@qrilka I figured this out!
nix develop github:ryantm/home-manager-template/flakes -c home-manager switch
Caveats to this method: you have to be okay with whatever is pinned my flake.lock
file. You can, of course, copy the flake.nix
file into your directory, and use
nix develop -c home-manager switch
Then you are in control of the pinning.
I have a tutorial for this at https://github.com/ryantm/home-manager-template/tree/flakes#tutorial now.
@ryantm nix-2.4 was merged not so long ago, do you plan to merge flakes into master?
@qrilka I think this repository may be outmoded by how home-manager works with flakes now. But flakes are not yet on a stable nix shipped with nixpkgs, so probably I'll wait to make any changes here.
Thanks for letting me know, any particular link in HM docs that you could point me to? I was also waiting for flakes to land in stable nixpkgs BTW
@qrilka https://nix-community.github.io/home-manager/index.html#ch-nix-flakes
I used that to flakify my config: https://github.com/ryantm/dotfiles
Great, thanks, will take a look
I have followed the instruction listed in the README and in the end I don't have any commands in my
~/.nix-profile/bin
and thusswitch.sh
doesn't install anything. Any idea what could I be doing wrong? One note though that I don't use NixOS on this machine - I have Gentoo here.