diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-07-03 21:49:17 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-07-03 21:49:17 +0200 |
| commit | f05ec68a157103228277526860f06b483a5ebba9 (patch) | |
| tree | 1067b78876b30f49e4e84037a82ef845d2bd7b3f | |
| parent | 8d2964670287f55c5a25f39cde1ebc770f3e08d4 (diff) | |
| download | nix-infra-f05ec68a157103228277526860f06b483a5ebba9.tar.gz nix-infra-f05ec68a157103228277526860f06b483a5ebba9.tar.bz2 nix-infra-f05ec68a157103228277526860f06b483a5ebba9.zip | |
snapshot: Do 3. Jul 21:49:17 CEST 2025
| -rw-r--r-- | srv/hadante/colemak.nix | 48 | ||||
| -rw-r--r-- | srv/hadante/configuration.nix | 1 |
2 files changed, 49 insertions, 0 deletions
diff --git a/srv/hadante/colemak.nix b/srv/hadante/colemak.nix new file mode 100644 index 0000000..267feca --- /dev/null +++ b/srv/hadante/colemak.nix @@ -0,0 +1,48 @@ +{ pkgs, ... }: +{ + config = { + nixpkgs.config.packageOverrides = super: rec { + xorg = super.xorg // rec { + xkeyboardconfig_colemak_mods = super.xorg.xkeyboardconfig.overrideAttrs (old: rec { + kbdTricks = pkgs.fetchFromGitHub { + owner = "DreymaR"; + repo = "BigBagKbdTrixXKB"; + rev = "d01cfc801fea7118001482b7b2c4184b3aac960e"; + sha256 = ""; + }; + + postFixup = '' + bash ${kbdTricks}/install-dreymar-xmod.sh -nsoc $out/etc/X11 5caw ro us + ''; + }); + + xorgserver = super.xorg.xorgserver.overrideAttrs (old: { + configureFlags = old.configureFlags ++ [ + "--with-xkb-bin-directory=${xkbcomp}/bin" + "--with-xkb-path=${xkeyboardconfig_colemak_mods}/share/X11/xkb" + ]; + }); + + setxkbmap = super.xorg.setxkbmap.overrideAttrs (old: { + postInstall = '' + mkdir -p $out/share + ln -sfn ${xkeyboardconfig_colemak_mods}/etc/X11 $out/share/X11 + ''; + }); + + xkbcomp = super.xorg.xkbcomp.overrideAttrs (old: { + configureFlags = old.configureFlags ++ [ + "--with-xkb-config-root=${xkeyboardconfig_colemak_mods}/share/X11/xkb" + ]; + }); + + }; # xorg + + xkbvalidate = super.xkbvalidate.override { + libxkbcommon = super.libxkbcommon.override { + xkeyboard_config = xorg.xkeyboardconfig_colemak_mods; + }; + }; + }; # packageOverrides + }; +} diff --git a/srv/hadante/configuration.nix b/srv/hadante/configuration.nix index fe5462e..d9b8d93 100644 --- a/srv/hadante/configuration.nix +++ b/srv/hadante/configuration.nix @@ -22,6 +22,7 @@ in ./mako.nix ./fuzzel.nix ./vintage-story.nix + ./colemak.nix ]; options = { |
