From 2f6e9daa733015b9aaa2c2d7eefd24fa4d299ac5 Mon Sep 17 00:00:00 2001 From: Christian Harke Date: Fri, 21 Jun 2024 14:58:14 +0200 Subject: [PATCH] Switch keyboard layout to neo --- home/programs/polybar/default.nix | 23 +++++++++++++++++------ home/users/christian/default.nix | 3 --- nixos/base/input/default.nix | 16 ++++------------ 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/home/programs/polybar/default.nix b/home/programs/polybar/default.nix index 1e3fd946..d40fd041 100644 --- a/home/programs/polybar/default.nix +++ b/home/programs/polybar/default.nix @@ -68,6 +68,7 @@ in cpu = mkEnableOption "CPU monitor" // { default = true; }; date = mkEnableOption "Date monitor" // { default = true; }; disk = mkEnableOption "Disk monitor" // { default = true; }; + keyboard = mkEnableOption "Keyboard layout monitor" // { default = true; }; memory = mkEnableOption "Memory monitor" // { default = true; }; temperature = mkEnableOption "Temperature monitor" // { default = true; }; volume = mkEnableOption "Volume monitor" // { default = true; }; @@ -169,6 +170,7 @@ in (if weather then [ "wtr" ] else [ ]) ++ (if volume then [ "vol" ] else [ ]) ++ (if battery then [ "bat" ] else [ ]) ++ + (if keyboard then [ "kbd" ] else [ ]) ++ (if date then [ "date" ] else [ ]) ++ [ "tray" ] ); @@ -290,6 +292,17 @@ in label-warn-foreground = "\${colors.alert}"; }; + "module/wtr" = { + type = "custom/script"; + exec = "${getExe pkgs.bash} ${config.xdg.configFile."polybar/weather-plugin.sh".target}"; + tail = false; + interval = 600; + + # Format + format-prefix = "WTR "; + format-prefix-foreground = "\${colors.primary}"; + }; + "module/vol" = { type = "internal/pulseaudio"; @@ -364,14 +377,12 @@ in ramp-capacity-4 = " "; }; - "module/wtr" = { - type = "custom/script"; - exec = "${getExe pkgs.bash} ${config.xdg.configFile."polybar/weather-plugin.sh".target}"; - tail = false; - interval = 600; + "module/kbd" = { + type = "internal/xkeyboard"; + label-layout = "%variant%"; # Format - format-prefix = "WTR "; + format-prefix = "LAY "; format-prefix-foreground = "\${colors.primary}"; }; diff --git a/home/users/christian/default.nix b/home/users/christian/default.nix index b7e4d064..ea3924dc 100644 --- a/home/users/christian/default.nix +++ b/home/users/christian/default.nix @@ -26,9 +26,6 @@ in fonts.enable = !config.custom.roles.mobile.enable; git.enable = true; gpg.enable = true; - hardware = mkIf pkgs.stdenv.isLinux { - kmonad.enable = !config.custom.roles.mobile.enable; - }; mobile.enable = config.custom.roles.mobile.enable; office.cli.enable = config.custom.roles.office.cli.enable; shell.enable = true; diff --git a/nixos/base/input/default.nix b/nixos/base/input/default.nix index 7f539dfd..a568ccd8 100644 --- a/nixos/base/input/default.nix +++ b/nixos/base/input/default.nix @@ -10,20 +10,12 @@ in { services = { - xserver = { - layout = "ch"; + xserver.xkb = { + layout = "de,de"; + variant = "neo_qwertz,bone"; + options = "grp:rctrl_toggle"; }; - - udev.extraRules = '' - KERNEL=="event*", SUBSYSTEM=="input", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput" - KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput" - ''; }; console.useXkbConfig = true; - - users.groups = { - input.members = baseCfg.users; - uinput.members = baseCfg.users; - }; }