Hello, I am using home-manager and nixpkgs in the unstable branch and with the latest releases (literally just ran nix flake update). I have waybar installed using home-manager, currently the generated waybar config contains doubled values for certain keys for example:
which baffles me since i cannot seem to find any other mentions of a similar issue so i will put this up here while i keep looking for answers and if anyone wants to help please do and if you need more information i will happily provide
That should be [] not {}. And if that’s already set in some other module then you’re doubling it by setting it again, since list definitions are merged by concatenation.
Probably should have phrased it better, the duplication bug was what I meant. I am currently attempting to explore around with nixos-option but it seems kinda wonky with home-manager, doesn’t seem to want to evaluate everything properly but throws errors like
The option `home-manager.users.myUser.accounts.calendar.basePath' was accessed but has no value defined. Try setting the option.
Oh, whoops, I didn’t read carefully that it’s about HM. Are you using HM as a NixOS module or standalone HM?
In the latter case, use nix eval FLAKE#homeConfigurations.USERNAME.options.OPTIONPATH.definitionsWithLocation, replacing FLAKE, USERNAME and OPTIONPATH accordingly. If the former then nixos-option should work with just home-manager.users.USERNAME.OPTIONPATH
Ok so this is just getting weirder:
According to nixos-option the value of home-manager.users.myUser.programs.waybar.settings is [ ] which it really shouldnt be? (tried using the example values as well but it got the same issue as my own value with duplication)
I am unable to access anything below settings
From what I can see in the definition here:
# The clean list of configurations
276 │ finalConfiguration = map makeConfiguration settings;
277 │
278 │ configSource = jsonFormat.generate "waybar-config.json" finalConfiguration;
From what I can gather, the bug should be in jsonFormat.generate but this seems to be some kind of custom function since I cannot really find it on google or noogle and I am too tired to dig through home-managers github right now so will probably continue tomorow.
Ok, after much tomfoolery and shenanigans I finally got a minimalized (not completely minimal but I do like some functionality to be able to do stuff). Its also anonymized with myUser as the user and hardware-config.nix is missing so you cannot accidentally build with it:
It should be, only really need to change to correct hardware-config.nix. I could set the default import to /etc/nixos/hardware-configuration if that would be more appropriate?
Edit: now set the import to /etc/nixos/hardware-configuration.nix
There’s no way for nix or the module system to warn for that - import is a nix builtin, and you can think of it as just placing the entire contents of the import-ed file where you import it.
I personally try to stick to a consistent way of laying out my configs, so that I don’t accidentally make those kinds of errors.