diff --git a/config/hyprland.nix b/config/hyprland.nix index 4a8931c..8957799 100644 --- a/config/hyprland.nix +++ b/config/hyprland.nix @@ -14,6 +14,7 @@ let browser terminal extraMonitorSettings + keyboardLayout ; in with lib; @@ -63,7 +64,7 @@ with lib; col.inactive_border = rgb(${config.stylix.base16Scheme.base01}) } input { - kb_layout = us + kb_layout = ${keyboardLayout} kb_options = grp:alt_shift_toggle kb_options = caps:super follow_mouse = 1 diff --git a/hosts/default/config.nix b/hosts/default/config.nix index 2b0772d..26184e7 100644 --- a/hosts/default/config.nix +++ b/hosts/default/config.nix @@ -6,7 +6,9 @@ options, ... }: - +let + inherit (import ../hosts/${host}/variables.nix) keyboardLayout; +in { imports = [ ./hardware.nix @@ -329,7 +331,7 @@ xserver = { enable = false; xkb = { - layout = "us"; + layout = "${keyboardLayout}"; variant = ""; }; }; @@ -359,7 +361,7 @@ printing = { enable = true; drivers = [ - # pkgs.hplipWithPlugin + # pkgs.hplipWithPlugin ]; }; gnome.gnome-keyring.enable = true; @@ -467,6 +469,8 @@ driSupport32Bit = true; }; + console.keyMap = "${keyboardLayout}"; + # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; diff --git a/hosts/default/variables.nix b/hosts/default/variables.nix index 131b9d5..5a03952 100644 --- a/hosts/default/variables.nix +++ b/hosts/default/variables.nix @@ -12,4 +12,5 @@ # Program Options browser = "brave"; # Set Default Browser (google-chrome-stable for google-chrome) terminal = "kitty"; # Set Default System Terminal + keyboardLayout = "us"; } diff --git a/install-zaneyos.sh b/install-zaneyos.sh index 6ed2a31..2c36282 100755 --- a/install-zaneyos.sh +++ b/install-zaneyos.sh @@ -65,6 +65,14 @@ git config --global user.email "installer@gmail.com" git add . sed -i "/^\s*host[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$hostName\"/" ./flake.nix + +read -rp "Enter your keyboard layout: [ us ] " keyboardLayout +if [ -z "$keyboardLayout" ]; then + keyboardLayout="us" +fi + +sed -i "/^\s*keyboardLayout[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$keyboardLayout\"/" ./hosts/$hostName/variables.nix + echo "-----" installusername=$(echo $USER)