-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hyprlock: new module prevents specifying any other attributes #629
Comments
If the |
The hypr syntax allows any option to be defined multiple times. In Nix language this is translated into the option name as the key and a list with all different values: # home.nix
wayland.windowManager.hyprland.settings.bind = [
"$meta, W, killactive"
"$meta, M, fullscreen, 1"
"$meta_CTRL, M, fullscreen"
"$meta, K, togglefloating"
];
But for some reason you are also allowed to define just one value so instead of the value being inside the list it is just the value of the option. This is whats happening here. I naively assumed that everyone would just define their |
So I did some tinkering and found out that it's totally valid to have multiple input fields in hyprlock. Also stylix can assume that the value of the option is a list because there are zero advantages of using a set over using a list for #...
programs.hyprlock.settings = {
#...
input-field = map (x:
x // {
outer_color = "rgb(${base03})";
inner_color = "rgb(${base00})";
font_color = "rgb(${base05})";
fail_color = "rgb(${base08})";
check_color = "rgb(${base0A})";
};
) config.programs.hyprlock.settings.input-field;
};
#... |
Unless |
From past experience I don't think this is possible without making changes upstream. The "ideal" place to implement this would be in the NixOS option system itself, in a similar way to Or as mentioned, support could be added in Home Manager for this module in particular, but I doubt that would be appropriate unless it would also have a use case for a more general audience. |
With the recent addition of #619 (whoo new module btw, thanks @oscar-schwarz 🥳 ) , I've noticed that any attributes applied to the
input-field
setting cause a conflict with the Stylix module, e.g:I notice that in the HM module's example and in my config, the setting is given as a list, whereas the new Stylix module provides an attrset.
Or, are the examples to mean that multiple input fields can be defined, as I also have this in my config:
which I assume means multiple images can be defined and positioned
Perhaps there's some merging strategy that can be used to set the color opts whether they're a list or attribute set?
Edit: I just tested, and changing my
input-field
from a single-item list to an attrSet has fixed things and the configs have merged without me needing to omitinput-field
from my config entirely. As the examples on Home Manager have it as a list.... should I close this or leave it open?The text was updated successfully, but these errors were encountered: