Merge branch 'console_font' into 'main'

Add variable for console keymap

See merge request Zaney/zaneyos!58
This commit is contained in:
Tyler Kelley 2025-01-29 19:43:52 +00:00
commit 51178083c6
5 changed files with 15 additions and 4 deletions

View File

@ -7,7 +7,7 @@
... ...
}: }:
let let
inherit (import ./variables.nix) keyboardLayout; inherit (import ./variables.nix) keyboardLayout consoleKeyMap;
in in
{ {
imports = [ imports = [
@ -466,7 +466,7 @@ in
enable = true; enable = true;
}; };
console.keyMap = "${keyboardLayout}"; console.keyMap = "${consoleKeyMap}";
# Open ports in the firewall. # Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedTCPPorts = [ ... ];

View File

@ -13,4 +13,5 @@
browser = "brave"; # Set Default Browser (google-chrome-stable for google-chrome) browser = "brave"; # Set Default Browser (google-chrome-stable for google-chrome)
terminal = "kitty"; # Set Default System Terminal terminal = "kitty"; # Set Default System Terminal
keyboardLayout = "us"; keyboardLayout = "us";
consoleKeyMap = "us";
} }

View File

@ -8,7 +8,7 @@
... ...
}: }:
let let
inherit (import ./variables.nix) keyboardLayout; inherit (import ./variables.nix) keyboardLayout consoleKeyMap;
in in
{ {
imports = [ imports = [
@ -463,7 +463,7 @@ in
enable32Bit = false; enable32Bit = false;
}; };
console.keyMap = "${keyboardLayout}"; console.keyMap = "${consoleKeyMap}";
# Open ports in the firewall. # Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedTCPPorts = [ ... ];

View File

@ -15,4 +15,5 @@ monitor=eDP-1,2560x1600@60,0x0,1.25
browser = "brave"; # Set Default Browser (google-chrome-stable for google-chrome) browser = "brave"; # Set Default Browser (google-chrome-stable for google-chrome)
terminal = "kitty"; # Set Default System Terminal terminal = "kitty"; # Set Default System Terminal
keyboardLayout = "us"; keyboardLayout = "us";
consoleKeyMap = "us";
} }

View File

@ -75,6 +75,15 @@ sed -i "/^\s*keyboardLayout[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$keyboardL
echo "-----" echo "-----"
read -rp "Enter your console keymap: [ us ] " consoleKeyMap
if [ -z "$consoleKeyMap" ]; then
consoleKeyMap="us"
fi
sed -i "/^\s*consoleKeyMap[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$consoleKeyMap\"/" ./hosts/$hostName/variables.nix
echo "-----"
installusername=$(echo $USER) installusername=$(echo $USER)
sed -i "/^\s*username[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$installusername\"/" ./flake.nix sed -i "/^\s*username[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$installusername\"/" ./flake.nix