<niacdoial>
er… I guess dumb question but… do you know what the best way of overriding (overlaying over?) the home-files package would be?
cole-h has joined #home-manager
<niacdoial>
I have a couple homemade packages that create stuff that essentially works like home-files, so I am trying to create a second package that just merges the build outputs of home-files and my first package, and then profit of the automatic linking/unlinking when running `home-manager switch` and the like
<niacdoial>
(OK that might have been badly worded, I guess let me know if I should re-write it for clarity)
<petrichor>
You can create your own home-manager module and set `config.home.files` there and it will be merged with your main `home.files` when you include that module
<niacdoial>
OK thanks! I guess I just need to find out how where to declare this inclusion.
justanotheruser has joined #home-manager
rajivr has quit [Quit: Connection closed for inactivity]
johnw has joined #home-manager
chisui has joined #home-manager
<chisui>
Hey, is there a reason that all programs are provided with one configuration file? Is that a code style requirement? I would like to break up the configuration that I'm writing.
<rycee>
chisui: Could you explain a bit more? I'm not certain what you mean.
<__monty__>
chisui: You can import other nix files into your home.nix. Or even use the dotfiles you already have verbatim if you don't see the benefit of having configs in nix.
<chisui>
Sorry for being vague. Most programs in https://github.com/nix-community/home-manager/tree/master/modules/programs are provided by exactly one nix file. Sub folders are only provided for additional configuration options like `vscode/haskell.nix`. I would like to provide bindings for thunderbird. Unfortunately these are pretty big and I would like
<__monty__>
Ah, shouldn't have assumed anything, like rycee.
<chisui>
Or I could have been less cryptic
<rycee>
chisui: Right, I think it's fine to break it up in multiple files if that feels more natural for the module.
<chisui>
Ok, thanks. Just wanted to make sure before I have to refactor it in the PR.
<rycee>
That said, I don't particularly mind large module files as long as they are reasonably organized. I'd say that having the code in a single file makes it a bit simpler to understand the module since you easily can look up definitions of variables and such by simply searching the file for the variable name.
<rycee>
When the module is split over multiple files then you you have to look in multiple files for definitions.
<rycee>
So in general I'd say to simply start with one file. If it gets too unwieldy then split it up.
<davidak[m]>
how can i set MANGOHUD=1 in ~/.profile? i think programs.bash.sessionVariables, but 1 is interpreted as string and ends up as export MANGOHUD="1"
<petrichor>
I don't think bash cares about the difference?
<rycee>
DigitalKiwi: Nice :-)
<rycee>
davidak: Yeah, shouldn't matter.
<davidak[m]>
it does not work. i even rebooted
<rycee>
davidak: In which way doesn't it work? The variable does not get set?
<rycee>
Or it gets set but the programs using it doesn't interpret it as expected?
<davidak[m]>
the latter
<SumnerEvans[m]>
What program is this? It sounds like it would be a bug on their side.
<rycee>
davidak: How do you run mangohud, in a systemd service? Also, does it work if you run it manually with `MANGOHUD=1 mangohud …`?
<davidak[m]>
i want to use it with steam games and if i understand it correctly, setting MANGOHUD=1 in ~/.profile would activate it by default for every vulkan game... but i have no idea how that might work. does vulkan know about mangohud???
<rycee>
Ah, right. You used `programs.bash.sessionVariables`, sorry forgot.
<rycee>
Does `bash -l -c 'echo $MANGOHUD'` print anything?
<davidak[m]>
that prints 1
<rycee>
Ah ok. Try changing `programs.bash.sessionVariables.MANGOHUD = 1` to `home.sessionVariables.MANGOHUD = 1` and relog.
<rycee>
I think the problem is that you are not in a login shell. You'll want to use `home.sessionVariables` so that the variables get read from `~/.xprofile`, which hopefully should include `. "/home/rycee/.nix-profile/etc/profile.d/hm-session-vars.sh"`.
<rycee>
Well, not necessarily with the `/home/rycee` part :-)
<davidak[m]>
it does not work and .xprofile does not exist
<rycee>
Then you'll have to create it and put the sourcing of `hm-session-vars.sh` in it.
<rycee>
That's done automatically when HM manages the X session.
<davidak[m]>
yesss, that does work.
<davidak[m]>
can i manage the file with hm without letting it manage the x session otherwise?
<rycee>
Sure, add something like `home.file.".xprofile".text = ''. "${config.home.profileDirectory}/etc/profile.d/hm-session-vars.sh"'';` to your configuration.
<davidak[m]>
great. thanks
niacdoial has quit [Ping timeout: 268 seconds]
<rycee>
Sumner Evans: From what I can tell the default value of `exemptLabels` is `['pinned', 'security']`. So could add `pinned` as label?
<rycee>
davidak: Np, glad it works now.
__monty__ has quit [Quit: leaving]
svrana has joined #home-manager
<SumnerEvans[m]>
rycee: that works! Forgot that there was a default set of labels that were excluded. Thanks!