<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]
<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.
<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>
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