Skip to content

Commit

Permalink
Setup qwerty-fr keyboard layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigmanificient committed Feb 8, 2024
1 parent f8945ad commit c3c72c8
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .xinitrc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fi

# ↓ Wm startup
picom -f &
setxkbmap fr &
#setxkbmap fr &
flameshot &
dunst &
exec qtile start
5 changes: 5 additions & 0 deletions home/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,15 @@
./kitty.nix
];

xdg.configFile."xkb/symbols/us_qwerty-fr".source =
"${pkgs.callPackage ./../system/qwerty-fr.nix {}}"
+ "/usr/share/X11/xkb/symbols/us_qwerty-fr";
home = {
inherit username;
homeDirectory = "/home/${username}";

keyboard = null;

stateVersion = "22.11";
sessionVariables = {
EDITOR = pkgs.nano;
Expand Down
16 changes: 14 additions & 2 deletions system/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
nix-ld = {
enable = true;
libraries = with pkgs; [
glibc
glibc
];
};
};
Expand Down Expand Up @@ -174,12 +174,24 @@
xserver = {
enable = true;
displayManager.startx.enable = true;
layout = "fr";
layout = "custom";

extraLayouts.custom = {
description = "oui oui baguette";
languages = [ "eng" ];
symbolsFile =
let
ouioui = (pkgs.callPackage ./qwerty-fr.nix { });
in
"${ouioui}/usr/share/X11/xkb/symbols/us_qwerty-fr";
};

libinput = {
enable = true;
mouse.accelProfile = "flat";
touchpad.accelProfile = "flat";
};

windowManager.qtile = {
enable = true;
backend = "x11";
Expand Down
16 changes: 16 additions & 0 deletions system/qwerty-fr.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{ pkgs }:
pkgs.stdenv.mkDerivation rec {
pname = "qwerty-fr";
version = "0.7.3";

src = pkgs.fetchzip {
url = "https://github.com/qwerty-fr/${pname}/releases/download/v${version}/${pname}_${version}_linux.zip";
sha256 = "sha256-BZLp5Tw1BH/m1wHYAUbfP86uZ6poAjD2D/uvl2ajmi0=";
stripRoot = false;
};

installPhase = ''
mkdir -p $out
mv usr $out/usr
'';
}

0 comments on commit c3c72c8

Please sign in to comment.