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
romanofski has joined #home-manager
romanofski has quit [Ping timeout: 246 seconds]
romanofski has joined #home-manager
<hpfr[m]> I’m having trouble referencing an option I defined in a personal NixOS module from the home manager module. It seems to think it’s a home manager option
<hpfr[m]> I’m using config.myModule.option but home manager has its own config it seems. How do I reference the NixOS config?
<hpfr[m]> Found useGlobalPkgs
<hpfr[m]> Still doesn’t work with NixOS module options
hmpffff has joined #home-manager
klntsky has quit [Remote host closed the connection]
klntsky has joined #home-manager
__monty__ has joined #home-manager
quinn has quit [Quit: ZNC 1.7.5 - https://znc.in]
schmittlauch[m] has left #home-manager ["Kicked by @appservice-irc:matrix.org : Idle for 30+ days"]
simbergm has left #home-manager ["Kicked by @appservice-irc:matrix.org : Idle for 30+ days"]
tbenst[m] has quit [Quit: Idle for 30+ days]
hmpffff has quit [Quit: nchrrrr…]
<infinisil> hpfr[m]: You need to bring config in scope from the NixOS module around it
<infinisil> { config, ... }: { home-manager.users.foo = ...; }
<sparogy> would that work for getting nix-darwin's config into home-manager as well? They provide an interface to launchd that I'd just love to take advantage of
<hpfr[m]> infinisil: I do
<hpfr[m]> Still get error: attribute missing
<hpfr[m]> I have work so I can’t debug for the next nine hours but if you can paste a minified NixOS config example that builds, where a NixOS module is referenced via `config.` within the home-manager function I’ll try to compare it to what I have. I don’t know what I’d be missing :/
<hpfr[m]> My use case is to programmatically define size settings in the polybar module via `config.services.xserver.dpi`
asymptotically has joined #home-manager
asymptotically has quit [Remote host closed the connection]
asymptotically has joined #home-manager
hmpffff has joined #home-manager
malSet has quit [Quit: Quit.]
hmpffff has quit [Quit: nchrrrr…]
malSet has joined #home-manager
asymptotically has quit [Ping timeout: 240 seconds]
asymptotically has joined #home-manager
asymptotically has quit [Remote host closed the connection]
<evanjs> alright, having a brainfart here. in the manual it says "If you do not plan on having Home Manager manage your shell configuration then you must source the $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh file in your shell configuration."
<evanjs> What's the alternative to this? Just enabling programs.bash or etc?
<evanjs> I only really have home-manager set up on my NixOS systems; trying to do so on some non NixOS systems, but can only manage to add things to home.packages atm
<evanjs> none of the other options seem to be taking effect :D
<evanjs> currently, my .profile has if [ -e /home/evanjs/.nix-profile/etc/profile.d/nix.sh ]; then . /home/evanjs/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
<evanjs> and export NIX_PATH=$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH
<rycee> evanjs: Yes, either source that file or enable program.bash, program.zsh, or program.fish, depending on which your prefer.
<evanjs> rycee: okay so that's where I got confused
<evanjs> programs.zsh.enable _is_ on lol
<rycee> evanjs: By sourcing I mean to put `. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"` in your `~/.profile` file.
<rycee> Did you relog?
<rycee> Changes in session variables only take effect after you log out and back in.
<evanjs> on WSL rn :D
<evanjs> Just tried with the commands recommended here https://superuser.com/a/1347725/779882 but yeah nothing still
<rycee> Then I'm not sure what's going. Try see if zsh really runs the generated `.zshrc` file.
<evanjs> Okay whoah good call
<evanjs> So running zsh does invoke the proper zshell. On launching a new terminal (which invokes the default shell), it just does bash
<evanjs> do I need to chsh or something?
<evanjs> I feel like I tried that before but it broke stuff
<evanjs> either that or I'm missing something in my config, though I figure it's probably the former
<rycee> eyJhb: The `null` alternative is only in the master version of HM.
klntsky has quit [Ping timeout: 240 seconds]
klntsky has joined #home-manager
<rycee> evanjs: `programs.bash.enableAutojump = true` has no effect unless you also enable bash config generation using `programs.bash.enable = true`.
<rycee> evanjs: I don't know the best way to use zsh, I've only ever used bash on NixOS.
<rycee> Perhaps somebody else know.
<rycee> Wouldn't it work to just switch the user's login shell?
<evanjs> Well that's what I was looking at. But then it needs to be in /etc/shells, which NixOS seems to add once zsh is installed
<rycee> Right. I would imagine it is done using `users.users.<name?>.shell`.
<evanjs> Right yeah. Maybe I _need_ to source hm-session-vars outside NixOS for other shells, then?
<rycee> Yeah. Nothing in NixOS will attempt to source hm-session-vars.sh.
<eyJhb> Damn it. And the master follows nixos unstable/master, right?
<rycee> eyJhb: Yes. If you need the `null` alternative in 20.03 then I can cherry-pick that commit to the release-20.03 branch.
<eyJhb> Hmm. as of now I do not need it, but in the future I might. I can open a PR or ping you if it becomes a reality, or just cherry pick it locally
<eyJhb> Also, I had some questions for you regarding Firefox/Chromium extensions rycee
<eyJhb> Is there a way we can actually build them from source, like we do everything else, or does that add too much complexity?
<eyJhb> Also, for everyone, anyone using the autorandr module? Seems nice, but it is missing some features and the layout end output will not allow for autorandr to autodetect
<rycee> As far as I know nobody has built any infrastructure for building browser extensions from source. Although, there are a few extensions in Nixpkgs build for source in the tor bundle.
<eyJhb> Would be awesome to have that tbh.
<eyJhb> If my arms were not killing me, I would look at it.
<rycee> It would probably be nice but I suspect most people are satisfied enough with pre-baked XPI-files :-/
<evanjs> Okay... looks like after I chsh zsh, it ignores .profile. wat
<evanjs> mmyup. chsh back to bash and $NIX_PATH is not empty
<eyJhb> That is true rycee.. If it works then I guess most will enjoy it
<eyJhb> What it a easy way to inherit fram the same code block, this seems bloated - userName = config.accounts.email.accounts,default-gmail.address;
<evanjs> ahhh
<evanjs> Existing file '/home/evanjs/.profile' is in the way of '/nix/store/70ncsxvn5x8jfj3i6baipbzqqafvm66j-home-manager-files/.profile'
<evanjs> ^ when I enabled bash
<evanjs> didn't get that for zsh
<rycee> evanjs: It means you have an existing `/home/evanjs/.profile` file that is not managed by HM.
<evanjs> no no I know
<evanjs> but like it didn't bother with profile when I enabled zsh is all
<evanjs> which I found odd
<rycee> No, the `.profile` file is used by bash. Zsh will use its own files.
<rycee> `.zprofile` I think plus a bunch of others, `.zshrc`, `.zshenv`, …
<evanjs> ah yeah that makes sense then
<evanjs> I was reading the step in the manual too literally in that case :P
<rycee> eyJhb: using `rec` should be ok: `rec { userName = "abc"; address = userName; }` but myself I typically would use a `let` expression.
<rycee> evanjs: Yeah, the example in the installation instructions is for bash only.
<evanjs> rycee: yeah I figured that much, I just didn't apply that logic to the entire example :D
hmpffff has joined #home-manager
<evanjs> everything is working after I put those two lines into my .zprofile. Though it looks like enabling bash in this case breaks its interop with nix? Bah
<evanjs> as hm manages files like .bash_profile and .profile that don't source anything to load the NIX_PATH
<rycee> Yep. You'd have to add sourcing of `nix.sh` to your HM bash configuration.
<evanjs> Right that's what I figured after passing initExtra in the man again
<rycee> Alternatively you can add `targets.genericLinux.enable = true` to your configuration. That will also fix some other issues like the XDG_DATA_DIRS variable.
<evanjs> ooooooo
<rycee> When I have the time I'll make the install script add that to the generated home.nix automatically for non-NixOS systems.
<evanjs> rycee: sounds good. Was just sorta lost as I don't usually use non-NixOS systems and wasn't sure how hm plays with them
<DamienCassou> I'm done with my PR adding support for powerline-go. https://github.com/rycee/home-manager/pull/1285
<{^_^}> #1285 (by DamienCassou, 1 minute ago, open): powerline-go: add module
<DamienCassou> I would love to get feedback
<rycee> I'll have a look.
asymptotically has joined #home-manager
<DamienCassou> thank you!
MmeQuignon has joined #home-manager
__monty__ has quit [Ping timeout: 272 seconds]
__monty__ has joined #home-manager
quinn has joined #home-manager
__monty__ has quit [Ping timeout: 240 seconds]
__monty__ has joined #home-manager
quinn has quit [Quit: ZNC 1.7.5 - https://znc.in]
quinn has joined #home-manager
asymptotically has quit [Ping timeout: 240 seconds]
<sparogy> Is there any way to declaratively add a few paths to my user's PATH? I have one or two that I'd like to add
<NobbZ[m]> sessionVars?
<sparogy> yeah, that seems to overwrite my PATH completely, and I can't append to it
<sparogy> but something like `sessionVars.PATH="$PATH;my/extra/paths"` mostly works
<sparogy> I would love to hace something that I could use like home.packages, calling it from different files just for code organization though
<NobbZ[m]> You can abstract something that merges strings with colons, always containing `$PATH` literally.
<sparogy> that is exactly what I want
<sparogy> now how to build it...
<NobbZ[m]> `lib.types` has a string separated with type. It's even parametric IIRC
hmpffff has quit [Quit: nchrrrr…]
hmpffff has joined #home-manager
hmpffff has quit [Client Quit]
MmeQuignon has quit [Ping timeout: 246 seconds]
<NobbZ[m]> `types.envVar`
<sparogy> oh wow that makes it a lot easier
<sparogy> thansk!
<sparogy> * thanks!
__monty__ has quit [Quit: leaving]
romanofski has quit [Ping timeout: 265 seconds]
romanofski has joined #home-manager