rycee changed the topic of #home-manager to: Support and discussion around the Home Manager project (https://github.com/rycee/home-manager) | Logs: https://logs.nix.samueldr.com/home-manager
chiefgoat has quit [Ping timeout: 272 seconds]
chiefgoat has joined #home-manager
hmpffff has joined #home-manager
hmpffff has quit [Quit: nchrrrr…]
hmpffff has joined #home-manager
__monty__ has joined #home-manager
pie_ has quit [Ping timeout: 252 seconds]
hmpffff has quit [Quit: nchrrrr…]
asymmetric has quit [Quit: Peace.]
asymmetric has joined #home-manager
asymmetric has quit [Client Quit]
asymmetric has joined #home-manager
pie_ has joined #home-manager
<__monty__> rycee: Would using your nur module mean tracking hm master?
<rycee> __monty__: It will choose master or 19.03 depending on the Nixpkgs you are using when importing the module.
<__monty__> Oh, sweet : )
<rycee> If the command `nix-instantiate --eval -E '(import <nixpkgs> {}).lib.trivial.release'` says "19.09" it will choose the master branch of HM and if it says "19.03" it will choose the release-19.03 branch.
<__monty__> Still stuck on the Applications thing. If I set useUserPackages to false darwin-rebuild complains about my username not being an attribute.
<rycee> Odd, and it doesn't say any file and line?
<__monty__> rycee: Oh, it does `.nix-defexpr/home-manager/nix-darwin/default.nix:16:23`, so the nix-darwin module I suppose.
<rycee> `home.username = config.users.users.${name}.name;`
<__monty__> Oh, forgot a /channels/, haven't switched to the nur module yet, prefer synchronizing hm updates with my other channels.
<rycee> A bit peculiar, I guess your nix-darwin configuration should have a users.users.montry entry?
<__monty__> rycee: Ah, home-manager.users."name" isn't the right setting?
<__monty__> I guess I didn't add the users.users setting because I already had my user setup anyway.
<rycee> That's for `home-manager` settings, you still need a `users.users` one.
<rycee> At least HM assumes that `users.users` exists.
<rycee> The main thing HM needs is your user name and home directory path, which it takes from `users.users`.
<__monty__> Does it read the shell from there?
<rycee> Nope, HM doesn't pay any attention to your default shell :-)
<__monty__> Hmm, maybe switching useUserPackages off isn't straightforward? `sudo: /etc/profiles/per-user/toonn/bin/fish: command not found`
<rycee> From where do you get that error?
<__monty__> Running darwin-rebuild. My shell is set to fish in home.nix
<__monty__> I guess nix-darwin removed /etc/profiles before HM had a chance to put things in .nix-profile or something?
<rycee> I guess, but I don't understand why HM would attempt to run fish, especially under sudo.
<__monty__> Maybe it's just spawning a subshell or something? Which, if it uses my user's shell would be fish.
<__monty__> Though that doesn't sound right.
<rycee> Yeah, that seems odd. I believe HM uses bash for all scripts and it should always use an explicit path to bash inside the Nix store.
<__monty__> Any idea how to resolve this? Leaves my setup somewhat borked. Can't spawn new shells because the binary's gone.
<__monty__> Can I run home-manager switch to fix it or something?
<rycee> You should be able to do `nix-env -i /nix/var/nix/profiles/per-user/$USER/home-manager/home-path` to install the stuff into your ~/.nix-profile
<rycee> Otherwise I guess rolling back the nix-darwin generation should help.
<__monty__> And how do I find out why hm is trying to run sudo fish?
<__monty__> Sounds right. I guess `sudo -u` uses the user's shell by default?
<rycee> Yeah, that sounds right.
<rycee> But the user shell should be set by nix-darwin, why would it point into /etc/profiles/per-user/toonn?
<__monty__> I don't have anything about fish in my darwin configuration.nix
<__monty__> HM doesn't do this? Then I must've manually chsh'd or something.
<rycee> Perhaps, you could double check what your login shell is set to. If it's `/etc/profiles/per-user/toonn/bin/fish` then can change to your `nix-profile` path.
<rycee> In any case, that is the only line in HM that invokes `sudo` so it seems like the only candidate.
<__monty__> rycee: To test a change to HM do I replace the channel import with a path to the darwin module?
<rycee> Yeah. Something like `imports = [ /home/toonn/devel/home-manager/nix-darwin ];` should work fine.
judson has joined #home-manager
judson__ has joined #home-manager
<__monty__> rycee: Is it important for `activate` to run in a login shell?
hmpffff has joined #home-manager
hmpffff has quit [Quit: nchrrrr…]
<__monty__> rycee: I PRed the `-s` change in #807. Note that it doesn't magically fix the bad shell setup but it allows `activate` to be run regardless.
hmpffff has joined #home-manager
<rycee> __monty__: I don't recall exactly why it's run in a login shell. I haven't been much involved with the nix-darwin module.
<infinisil> Oh, I remember gchristensen asking if the bot would want to be here
<rycee> It might have something to do with the environment variables but in general the activation script should be self-contained enough that it suffices to run it under the correct user.
<infinisil> I could configure the bot to link to home-manager issues then
<rycee> infinisil: The {^_^} bot?
<infinisil> Yea
<rycee> I don't mind, sounds like a good idea :-)
<rycee> Anything particular I have to do?
<infinisil> Nah, I'll just ask gchristensen to add
<infinisil> it
gchristensen has joined #home-manager
<rycee> __monty__: I'll cc the macOS people in the PR :-)
<rycee> Greetings gchristensen :-)
<gchristensen> hey hey
<gchristensen> I'm confused as I thought I already sent {^_^} here
<gchristensen> anyway, the bot will arrive in the next deploy (hopefully tonight)
<rycee> Sweet, thanks!
hmpffff has quit [Quit: nchrrrr…]
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 258 seconds]
hmpffff has joined #home-manager
mexisme has joined #home-manager
mexisme has quit [Ping timeout: 252 seconds]
mexisme has joined #home-manager
__monty__ has quit [Quit: leaving]
hmpffff has quit [Quit: nchrrrr…]
judson__ has quit [Ping timeout: 268 seconds]
judson has quit [Ping timeout: 268 seconds]