Closed stratosgear closed 3 months ago
Hey there! Home manager modules also get an osConfig
argument that refers to the nixos (or Darwin) config. You should be able to reference that in order to set things dynamically.
So for example:
{ lib, osConfig ? {}, ... }:
{
config = lib.mkIf (osConfig.plusultra.suites.something or false) {
myOption = myValue;
};
}
Great thanks, that works!!! I had seen the osConfig
in the header but it never clicked to me what it meant :(
Now that I think about it, for symmetry reasons, does the reverse make sense? Accessing a home-manager setting from within the nixos config? How would that work?
@stratosgear Yes! You can do the reverse by setting home-manager.users.${name}.*
.
Heads up that if you're using Snowfall Lib, the next version won't work when using home-manager.users.${name}
. Instead you can use snowfallorg.user.${name}.home.config.*
.
Hi again,
I know this is not a bug and this is not a support channel, but I have the following, seemingly easy question, that I cannot figure out on my own.
Assuming that I have activated a suite, like in:
where I install some development tools.
If I would also like to set some aliases for some of the users defined in
/homes/x86_64-linux/aUser@someHost
only if the development suite has been enabled (as above) how would I query if the suite is enabled?If I try:
I get:
How do I access the "namespace?" of where all the nixos modules are defined?
It's such a abstract concept that I do not have any keywords to help me google this out... :(
Thanks!