Hello,
i’m trying to set the modifier key in sway to “Mod1+Ctrl”, which i have been using for years.
Unfortunately the package configuration option does not allow that value:
error: A definition for option `wayland.windowManager.sway.config.modifier' is not of type `one of "Shift", "Control", "Mod1", "Mod2", "Mod3", "Mod4", "Mod5"'.
i tried “Mod1+Control”, [ “Mod1” “Control” ], and i have been looking in nix.dev for a way to force a ‘invalid’ value.
then i set the modifier in keybindings:
but that resulted in duplicate entries in the generated .config/sway/config:
bindsym Mod1+1 workspace number 1
bindsym Ctrl+Mod1+1 workspace number 1
Ctrl+Mod1+1 being the one that i want.
Mod1+1 being the default value if the modifier is not set in the homemanager/sway configuration:
config = {
[..]
# modifier = "Mod1+Control"
[..]
As you can probably tell i’m new to nixos.
How should i do this?
You can then just switch to using your branch downstream until that gets merged.
Doing this downstream is possible, but not trivial, since you’ll have to overwrite an existing option. Changing modules is a tad more annoying than packages, sadly.