diff --git a/hardware/fcs-tristan-nixbook.nix b/hardware/fcs-tristan-nixbook.nix index 9adda5f..148d479 100644 --- a/hardware/fcs-tristan-nixbook.nix +++ b/hardware/fcs-tristan-nixbook.nix @@ -92,6 +92,14 @@ in { home-manager.users.${user}.imports = [ { home.stateVersion = "22.05"; + + wayland.windowManager.hyprland.settings = { + input = { + kb_variant = "dvorak,"; + kb_layout = "gb,gb"; + kb_options = "grp:alt_shift_toggle,caps:escape"; + }; + }; } ]; diff --git a/hardware/zenix.nix b/hardware/zenix.nix index 5fae2f8..318178e 100644 --- a/hardware/zenix.nix +++ b/hardware/zenix.nix @@ -94,6 +94,12 @@ in { workspace = 4, monitor:DP-1 workspace = 5, monitor:DP-1 ''; + settings = { + "device:zsa-technology-labs-moonlander-mark-i" = { + kb_variant = ""; + kb_options = "esperanto:qwerty,lv3:ralt_switch"; + }; + }; }; } ]; diff --git a/home/programs/hyprland.nix b/home/programs/hyprland.nix index a7bcf55..b632476 100644 --- a/home/programs/hyprland.nix +++ b/home/programs/hyprland.nix @@ -24,6 +24,9 @@ natural_scroll = true; scroll_factor = 0.5; }; + kb_options = lib.mkDefault "caps:escape"; + kb_layout = lib.mkDefault "gb"; + numlock_by_default = true; }; gestures = { workspace_swipe = true; diff --git a/nixos/default.nix b/nixos/default.nix index 3c2baf8..6fc381d 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -9,7 +9,6 @@ user = config.user; in { imports = [ - ./modules/keyboard.nix ./modules/display.nix ./modules/laptop.nix ../hardware/displays.nix diff --git a/nixos/modules/keyboard.nix b/nixos/modules/keyboard.nix deleted file mode 100644 index 895fda7..0000000 --- a/nixos/modules/keyboard.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ - lib, - config, - ... -}: let - user = config.user; -in - with lib; { - options.keyboard = { - dvorak = { - enable = mkEnableOption "use a good keyboard layout on a qwerty keyboard"; - }; - }; - - config = { - home-manager.users.${user}.imports = [ - { - wayland.windowManager.hyprland = { - settings = { - input = { - kb_layout = "gb"; - kb_options = "caps:escape"; - numlock_by_default = true; - }; - # moonlander is programmed in dvorak! - "device:zsa-technology-labs-moonlander-mark-i" = { - kb_variant = ""; - kb_options = "esperanto:qwerty,lv3:ralt_switch"; - }; - }; - }; - } - ]; - services.xserver.xkbVariant = - if config.keyboard.dvorak.enable - then "dvorak" - else ""; - }; - } diff --git a/nixos/modules/laptop.nix b/nixos/modules/laptop.nix index 6cf606a..59cf23d 100644 --- a/nixos/modules/laptop.nix +++ b/nixos/modules/laptop.nix @@ -22,7 +22,6 @@ in { scaling = 1.2; }; }; - keyboard.dvorak.enable = true; home-manager.users.${user}.imports = [ { @@ -35,11 +34,6 @@ in { bind = [ "SUPER_SHIFT, Q, killactive," ]; - "device:at-translated-set-2-keyboard" = { - kb_variant = ",dvorak"; - kb_layout = "gb,gb"; - kb_options = "grp:alt_shift_toggle,caps:escape"; - }; }; }; }