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
bemeurer has quit [Ping timeout: 250 seconds]
bemeurer has joined #home-manager
pie___ has joined #home-manager
pie__ has quit [Ping timeout: 246 seconds]
bemeurer has quit [Quit: WeeChat 2.4]
inquisitiv3 has joined #home-manager
<inquisitiv3> I'm trying to install home-manager on my Fedora system with Nix. Step 2 make me a little unsure on what I should do. I've run the `nix-channel` commands, and home-manager shows up when I run `nix-channel --list`. But should I change the $NIX_PATH? The wording in the instructions make it sound that it isn't everytime you need to do that on a system with just Nix.
<inquisitiv3> And if I need to do that, should I change the .bashrc or my fish shell config? The linked issue is a little over my head.
<inquisitiv3> I installed fish using `nix-env` and automatically start it every time by having my terminal emulator run `fish` at startup automatically.
<rycee> inquisitiv3: If `nix-shell '<home-manager>' -A install` works then you don't need to edit NIX_PATH.
<rycee> You can also run `echo $NIX_PATH` in a shell to see if ~/.nix-defexpr/channels is in there.
<rycee> And if you are initially starting bash then it is most convenient to edit .bashrc.
<rycee> Or, rather, ~/.profile
<rycee> I'm not exactly certain which file to use under Fedora. It should be the one sourced for a login shell :-)
<inquisitiv3> rycee: Thanks! `nix-shell '<home-manager>' -A install` gives me an error and `echo $NIX_PATH` gives me "nixpkgs=/home/user/.nix-defexpr/channels/nixpkgs". Seems like I've to add it then.
<rycee> Yeah, I'm not certain why it is that way for standalone Nix installs. Hopefully it will be changed at some point so that it won't be necessary to change NIX_PATH to support alternative channels.
inquisitiv3 has quit [Quit: Leaving]
inquisitiv3 has joined #home-manager
<inquisitiv3> rycee: Thakns for the help! After adding the path to $NIX_PATH to ~/.bash_profile, logging out and logging in I'm able to create the first home-manager gen! :D
<rycee> Awesome :-) Don't forget to add `. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"` as well. It is necessary to load the environment variables generated by Home Manager.
<inquisitiv3> No, I'll follow the instructions from beginning to end.
<inquisitiv3> But thanks for the reminder!
inquisitiv3 has quit [Quit: Leaving]
inquisitiv3 has joined #home-manager
<inquisitiv3> rycee: Did everything source correctly if `echo $__HM_SESS_VARS_SOURCED` return 1?
<rycee> Yeah, that is right :-)
<inquisitiv3> :D
<rycee> So if you add, for example, `home.sessionVariables = { FOO = "bar"; }` to your configuration then it will show up in the environment after `home-manager switch` and a relog.
<rycee> Some of the modules rely on this functionality to work so that's why it's pretty important.
<inquisitiv3> Thanks for the explaination.
<inquisitiv3> Is there any reason to manually edit the .config/nixpkgs/home.nix file? Thinking of excluding the file from my dotfiles (whole .config/nixpkgs dir)
<rycee> I typically set up .config/nixpkgs/home.nix to be a symlink into my git-managed dir of configurations.
<rycee> It is best not to have HM manage the .config/nixpkgs/home.nix file since you then have to run `home-manager switch` twice for any edits to take effect.
<rycee> You can also use the -f option with something like `home-manager -f ~/my-confs/hm-config.nix switch`
<inquisitiv3> When I'll be the file in my dotfiles' repo.
<inquisitiv3> How do you manage .config/nixpkgs/home.nix with HM directly? I probably missinterpret you.
<rycee> I don't manage .config/nixpkgs/home.nix at all. It is just a regular symbolic link that I created once. Like `ln -s ~/devel/nixos-config/user/beta.nix .config/nixpkgs/home.nix`.
<rycee> I have the same for the system configuration `ln -s ~/devel/nixos-config/system/beta.nix /etc/nixos/configuration.nix`.
<inquisitiv3> Aah, then I missinterpreted what you wrote. Thanks for all the help!
<pie___> yay activity
<pie___> rycee, you should probably mention freenode @ https://github.com/rycee/home-manager#contact :P
<rycee> pie___: Yeah, I'll expand that a bit in a while when I get on my computer. Thanks for the suggestion, it'll definitely make it clearer 😃
<rycee> pie___: Added a bit more to the contact section :-)
thomashoneyman has joined #home-manager
<thomashoneyman> hey folks! i'm trying to figure out how to set up autorandr so i can connect an external monitor (and turn off my laptop screen when connected)
<thomashoneyman> anyone know of a home.nix config using this?
<rycee> You mean using the `programs.autorandr` options?
<rycee> The `programs.autorandr.profiles` option seems to be what you are looking for. See https://rycee.gitlab.io/home-manager/options.html#opt-programs.autorandr.profiles
<thomashoneyman> I _think_ so
<thomashoneyman> oh, excellent, this looks like it!
<thomashoneyman> thanks
<thomashoneyman> i've really enjoyed home-manager so far, by the way, it's been a lovely introduction to NixOS
<thomashoneyman> otherwise i'd be knee-deep in shell scripts by now
<rycee> That's nice to hear. Thanks!
<thomashoneyman> excellent! this is properly detecting when displayport is connected and loading up the monitor
<thomashoneyman> but i tried setting the laptop display (eDP) to enable = false; and that doesn't appear to turn it off
<thomashoneyman> taken from here:
<thomashoneyman> i don't see another option that seems like it would turn off the display
<thomashoneyman> but maybe i'm misinterpreting what "enable = false" is meant to do
<rycee> Hmm, not sure. I don't use the module myself. Looking quickly at the code it does seem like it is intended to turn the output off if `enable = false`: https://github.com/rycee/home-manager/blob/master/modules/programs/autorandr.nix#L251-L252
<thomashoneyman> hmm there might be a weird interaction with xrandr
<thomashoneyman> in that i've changed xrandr settings while the machine's been running
<thomashoneyman> i was just reading that as well
<thomashoneyman> thanks!
<rycee> Well, I have to go to bed. Good luck! I'm not sure I can help very much anyway, my use of autorandr is pretty much limited to running `autorandr --change --default horizontal` and accepting whatever happens :-)
<thomashoneyman> haha
<thomashoneyman> understood! i just learned about autorandr about twenty minutes ago
<thomashoneyman> haven't used linux before