1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-05 16:41:04 +01:00

treewide: reformat nixfmt-rfc-style

Reformat repository using new nixfmt-rfc-style.
This commit is contained in:
Austin Horstman 2025-04-07 16:11:29 -05:00
parent 5df48c4255
commit cba2f9ce95
1051 changed files with 37028 additions and 26594 deletions

View file

@ -1,13 +1,17 @@
{ lib }:
let
letters = let
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
lettersList = lib.stringToCharacters alphabet;
indices = builtins.genList (i: i + 4) 26;
in lib.listToAttrs (lib.zipListsWith (letter: index: {
name = letter;
value = "0x${lib.toHexString index}";
}) lettersList indices);
letters =
let
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
lettersList = lib.stringToCharacters alphabet;
indices = builtins.genList (i: i + 4) 26;
in
lib.listToAttrs (
lib.zipListsWith (letter: index: {
name = letter;
value = "0x${lib.toHexString index}";
}) lettersList indices
);
numbers = {
One = "0x1E";
@ -124,16 +128,22 @@ let
Equal = "0x67";
};
mapToInt = keyPage: attrs:
lib.mapAttrs (name: value:
let keycode = lib.fromHexString (lib.removePrefix "0x" value);
in "0x${lib.toHexString (keyPage + keycode)}") attrs;
mapToInt =
keyPage: attrs:
lib.mapAttrs (
name: value:
let
keycode = lib.fromHexString (lib.removePrefix "0x" value);
in
"0x${lib.toHexString (keyPage + keycode)}"
) attrs;
page7Keys = mapToInt (lib.fromHexString "700000000") (letters // numbers
// specialKeys // fKeys1To12 // fKeys13To24 // navigationKeys
// modifierKeys);
page7Keys = mapToInt (lib.fromHexString "700000000") (
letters // numbers // specialKeys // fKeys1To12 // fKeys13To24 // navigationKeys // modifierKeys
);
pageFFKeys = mapToInt (lib.fromHexString "FF00000000") { Fn = "0x3"; };
in {
in
{
keyboard = page7Keys // pageFFKeys;
keypad = mapToInt keypadKeys;
}