Add centralized key reymapping

This commit is contained in:
GHOSCHT 2023-12-27 10:57:55 +01:00
parent e8dfc420fe
commit 72006c4716
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82
4 changed files with 358 additions and 2 deletions

View file

@ -39,6 +39,46 @@
"type": "github" "type": "github"
} }
}, },
"crane": {
"inputs": {
"nixpkgs": [
"xremap",
"nixpkgs"
]
},
"locked": {
"lastModified": 1701386725,
"narHash": "sha256-w4aBlMYh9Y8co1V80m5LzEKMijUJ7CBTq209WbqVwUU=",
"owner": "ipetkov",
"repo": "crane",
"rev": "8b9bad9b30bd7a9ed08782e64846b7485f9d0a38",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"devshell": {
"inputs": {
"nixpkgs": "nixpkgs_3",
"systems": "systems_3"
},
"locked": {
"lastModified": 1700815693,
"narHash": "sha256-JtKZEQUzosrCwDsLgm+g6aqbP1aseUl1334OShEAS3s=",
"owner": "numtide",
"repo": "devshell",
"rev": "7ad1c417c87e98e56dcef7ecd0e0a2f2e5669d51",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"firefox-addons": { "firefox-addons": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
@ -94,6 +134,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1698882062,
"narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8c9fa2545007b49a5db5f650ae91f227672c3877",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -203,6 +261,73 @@
"type": "github" "type": "github"
} }
}, },
"home-manager_2": {
"inputs": {
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1701071203,
"narHash": "sha256-lQywA7QU/vzTdZ1apI0PfgCWNyQobXUYghVrR5zuIeM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "db1878f013b52ba5e4034db7c1b63e8d04173a86",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"hyprland": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"nixpkgs": "nixpkgs_5",
"systems": "systems_4",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1701370414,
"narHash": "sha256-Q7A8BWWS1YndiNaAKM0IP73SGKJiQDfOdZAIdTLGNj8=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "b394c1695c05cf3b2133a473aa459d4cd750911b",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "Hyprland",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"xremap",
"hyprland",
"nixpkgs"
],
"systems": [
"xremap",
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1691753796,
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"nh": { "nh": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -273,6 +398,24 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib_2": {
"locked": {
"dir": "lib",
"lastModified": 1698611440,
"narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1685801374, "lastModified": 1685801374,
@ -321,6 +464,70 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": {
"locked": {
"lastModified": 1677383253,
"narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9952d6bc395f5841262b006fbace8dd7e143b634",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1700794826,
"narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1700612854,
"narHash": "sha256-yrQ8osMD+vDLGFX7pcwsY/Qr5PUd6OmDMYJZzZi0+zc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "19cbff58383a4ae384dea4d1d0c823d72b49d614",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1701336116,
"narHash": "sha256-kEmpezCR/FpITc6yMbAh4WrOCiT2zg5pSjnKrq51h5Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f5c27c6136db4d76c30e533c20517df6864c46ee",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit": { "pre-commit": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
@ -352,7 +559,8 @@
"nh": "nh", "nh": "nh",
"nix-colors": "nix-colors", "nix-colors": "nix-colors",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable" "nixpkgs-unstable": "nixpkgs-unstable",
"xremap": "xremap"
} }
}, },
"systems": { "systems": {
@ -384,6 +592,128 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"wlroots": {
"flake": false,
"locked": {
"host": "gitlab.freedesktop.org",
"lastModified": 1701368958,
"narHash": "sha256-7kvyoA91etzVEl9mkA/EJfB6z/PltxX7Xc4gcr7/xlo=",
"owner": "wlroots",
"repo": "wlroots",
"rev": "5d639394f3e83b01596dcd166a44a9a1a2583350",
"type": "gitlab"
},
"original": {
"host": "gitlab.freedesktop.org",
"owner": "wlroots",
"repo": "wlroots",
"rev": "5d639394f3e83b01596dcd166a44a9a1a2583350",
"type": "gitlab"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
"xremap",
"hyprland",
"hyprland-protocols"
],
"nixpkgs": [
"xremap",
"hyprland",
"nixpkgs"
],
"systems": [
"xremap",
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1700508250,
"narHash": "sha256-X4o/mifI7Nhu0UKYlxx53wIC+gYDo3pVM9L2u3PE2bE=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "eb120ff25265ecacd0fc13d7dab12131b60d0f47",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
},
"xremap": {
"inputs": {
"crane": "crane",
"devshell": "devshell",
"flake-parts": "flake-parts",
"home-manager": "home-manager_2",
"hyprland": "hyprland",
"nixpkgs": "nixpkgs_6",
"xremap": "xremap_2"
},
"locked": {
"lastModified": 1701816620,
"narHash": "sha256-axgWrKpoV1T7KVbbT+3H/Q6mcBdUKylIz6ClFCMRxlA=",
"owner": "xremap",
"repo": "nix-flake",
"rev": "5b264392686e6caee50c9b12cb290b7d0f23cf93",
"type": "github"
},
"original": {
"owner": "xremap",
"repo": "nix-flake",
"type": "github"
}
},
"xremap_2": {
"flake": false,
"locked": {
"lastModified": 1701234505,
"narHash": "sha256-7k6GsKDUBvhKL9JU/QkWO+IHvhaty1udOYP8fXKr9QY=",
"owner": "k0kubun",
"repo": "xremap",
"rev": "97268d1d92d94609daddff1230c4ca77d54a84dd",
"type": "github"
},
"original": {
"owner": "k0kubun",
"ref": "v0.8.12",
"repo": "xremap",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -27,6 +27,7 @@
url = "github:dwarfmaster/arkenfox-nixos"; url = "github:dwarfmaster/arkenfox-nixos";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
xremap.url = "github:xremap/nix-flake";
}; };
outputs = { outputs = {

View file

@ -4,7 +4,7 @@
pkgs, pkgs,
... ...
}: { }: {
imports = [./pipewire.nix ../printing.nix ./flatpak.nix ./xdg.nix]; imports = [./pipewire.nix ../printing.nix ./flatpak.nix ./xdg.nix ./xremap.nix];
# Enable networking # Enable networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;

View file

@ -0,0 +1,25 @@
{
pkgs,
inputs,
...
}: {
imports = [
inputs.xremap.nixosModules.default
];
services.xremap = {
withX11 = true;
config = {
keymap = [
{
name = "main remaps";
remap = {
super-e = {
launch = ["firefox"];
};
};
}
];
};
};
}