Initial commit

This commit is contained in:
2025-08-20 18:24:02 +03:00
commit 2dec42d487
116 changed files with 6591 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
{ lib, pkgs, ... }:
let
makebinds = attrs: lib.pipe attrs [
(attr: builtins.mapAttrs (_: keys: (builtins.map (key: "<${key}>") keys)) attr)
(attr: (builtins.mapAttrs (_: keys: (builtins.concatStringsSep " " keys)) attr))
(attr: (lib.attrsets.mapAttrsToList (sum: keys: ''<Multi_key> ${keys} : "${sum}"'') attr))
(attr: builtins.concatStringsSep "\n" attr)
];
binds = lib.concatStringsSep "\n" [
# ''include "%L"''
(makebinds {
"ě" = [ "e" "j" ];
"ѣ" = [ "Cyrillic_ie" "Cyrillic_ie" ];
"Ѣ" = [ "Cyrillic_IE" ];
"ѳ" = [ "Cyrillic_ef" ];
"ѵ" = [ "Cyrillic_i" ];
"ґ" = [ "Cyrillic_ghe" ];
"є" = [ "Cyrillic_ie" "Cyrillic_e" ];
"љ" = [ "Cyrillic_el" "Cyrillic_el" ];
"њ" = [ "Cyrillic_en" "Cyrillic_en" ];
"ѧ" = [ "Cyrillic_e" "Cyrillic_en" ];
"ѩ" = [ "Cyrillic_ie" "Cyrillic_en" ];
"ѫ" = [ "Cyrillic_o" "Cyrillic_en" ];
"ѭ" = [ "Cyrillic_io" "Cyrillic_en" ];
"¨" = [ "Colon" ];
"α" = [ "g" "a" ];
"β" = [ "g" "b" ];
"γ" = [ "g" "g" ];
"λ" = [ "g" "l" ];
})
];
in {
environment.variables.XCOMPOSEFILE = ".XCompose";
hm = {
home.file.".XCompose" = {
enable = true;
target = ".XCompose";
recursive = false;
text = binds;
};
programs.niri.settings.input.keyboard.xkb.file = toString (pkgs.writeText "compose.xkb" binds);
};
}