diff --git a/home/christoph/nixinator/default.nix b/home/christoph/nixinator/default.nix index 1048dad9..52a122cd 100644 --- a/home/christoph/nixinator/default.nix +++ b/home/christoph/nixinator/default.nix @@ -21,8 +21,11 @@ fcitx.enable = true; hyprland = { - kb-layout = "us"; - kb-variant = "altgr-intl"; + keyboard = { + layout = "us"; + variant = "altgr-intl"; + option = "nodeadkeys"; + }; monitors = { "HDMI-A-1" = { diff --git a/home/christoph/nixtop/default.nix b/home/christoph/nixtop/default.nix index 222622f6..f4662b81 100644 --- a/home/christoph/nixtop/default.nix +++ b/home/christoph/nixtop/default.nix @@ -7,10 +7,11 @@ config = { modules = { hyprland = { - # kb-layout = "de"; - # kb-variant = "nodeadkeys"; - kb-layout = "us"; - kb-variant = "altgr-intl"; + keyboard = { + layout = "us"; + variant = "altgr-intl"; + option = "nodeadkeys"; + }; monitors = { "eDP-1" = { diff --git a/home/modules/hyprland/default.nix b/home/modules/hyprland/default.nix index 0a9a268b..2ea6b0d9 100644 --- a/home/modules/hyprland/default.nix +++ b/home/modules/hyprland/default.nix @@ -102,7 +102,7 @@ "hyprsunset --identity" # HACK: Hyprland doesn't set the xwayland/x11 keymap correctly - "setxkbmap -layout ${hyprland.kb-layout} -variant ${hyprland.kb-variant} -model pc104" + "setxkbmap -layout ${hyprland.keyboard.layout} -variant ${hyprland.keyboard.variant} -option ${hyprland.keyboard.option} -model pc104" # HACK: Flatpak doesn't find applications in the system PATH "systemctl --user import-environment PATH && systemctl --user restart xdg-desktop-portal.service" @@ -419,10 +419,10 @@ in { }; input = { - kb_layout = "${hyprland.kb-layout}"; - kb_variant = "${hyprland.kb-variant}"; + kb_layout = hyprland.keyboard.layout; + kb_variant = hyprland.keyboard.variant; + kb_options = hyprland.keyboard.option; kb_model = "pc104"; - kb_options = ""; kb_rules = ""; follow_mouse = true; diff --git a/home/modules/hyprland/options.nix b/home/modules/hyprland/options.nix index 8e403d4c..13c77f11 100644 --- a/home/modules/hyprland/options.nix +++ b/home/modules/hyprland/options.nix @@ -5,16 +5,24 @@ }: rec { enable = lib.mkEnableOption "Hyprland Window Manager + Compositor"; - kb-layout = lib.mkOption { - type = lib.types.str; - example = "us"; - description = "Keyboard layout to use"; - }; + keyboard = { + layout = lib.mkOption { + type = lib.types.str; + example = "us"; + description = "Keyboard layout to use"; + }; - kb-variant = lib.mkOption { - type = lib.types.str; - example = "altgr-intl"; - description = "Keyboard layout variant"; + variant = lib.mkOption { + type = lib.types.str; + example = "altgr-intl"; + description = "Keyboard layout variant"; + }; + + option = lib.mkOption { + type = lib.types.str; + example = "nodeadkeys"; + description = "Keyboard layout options"; + }; }; dunst.enable = lib.mkEnableOption "Enable dunst notification daemon";