diff --git a/nixos/base.nix b/nixos/base.nix index b4d32fb0..7eb17aa9 100644 --- a/nixos/base.nix +++ b/nixos/base.nix @@ -61,12 +61,10 @@ hardware.bluetooth.enable = true; services.blueman.enable = true; - # Keyboard/Keymap - console.keyMap = "us"; - i18n = { defaultLocale = "en_US.UTF-8"; }; + console.useXkbConfig = true; # Update timezone automatically services.tzupdate.enable = true; @@ -85,9 +83,34 @@ hardware.keyboard.zsa.enable = true; services.xserver = { - exportConfiguration = true; enable = true; - layout = "us"; + + xkbOptions = "ctrl:swapcaps"; + layout = "us+rwin_as_hyper"; + extraLayouts.hyper = { + description = "Right Alt as Hyper key"; + languages = [ ]; + symbolsFile = pkgs.writeText "hyper" '' + partial modifier_keys + xkb_symbols "rwin_as_hyper" { + replace key { [ Hyper_R ] }; + modifier_map Mod3 { , Hyper_L, Hyper_R }; + }; + + partial modifier_keys + xkb_symbols "home_as_hyper" { + replace key { [ Hyper_L ] }; + modifier_map Mod3 { , Hyper_L, Hyper_R }; + }; + + partial modifier_keys + xkb_symbols "ralt_as_hyper" { + replace key { [ Hyper_L, Hyper_L ] }; + modifier_map Mod3 { , Hyper_L }; + }; + ''; + }; + desktopManager = { plasma5.enable = true; }; diff --git a/nixos/home-manager.nix b/nixos/home-manager.nix index d6f338e0..94966c2e 100644 --- a/nixos/home-manager.nix +++ b/nixos/home-manager.nix @@ -2,11 +2,10 @@ xsession = { enable = true; preferStatusNotifierItems = true; - importedVariables = [ "GDK_PIXBUF_ICON_LOADER" ]; + importedVariables = [ "GDK_PIXBUF_ICON_LOADER" "PATH" ]; profileExtra = '' export ROFI_SYSTEMD_TERM="alacritty -e" . "$HOME/.lib/login.sh" - load_xkb_map.sh ''; };