make evremap DRYer

This commit is contained in:
Schrottkatze 2023-11-14 13:43:01 +01:00
parent d9c9e8877d
commit 995714ced3
6 changed files with 29 additions and 51 deletions

View file

@ -1,23 +1,4 @@
{ pkgs, ... }:
let
evremap = pkgs.rustPlatform.buildRustPackage {
pname = "evremap";
version = "0.1.0";
src = pkgs.fetchFromGitHub {
owner = "wez";
repo = "evremap";
rev = "4480c4eda223b98899b0fbd926bc34f7bd0e1a18";
sha256 = "sha256-BxSrphgW1n465FX6bKVkq6O0XE2JqanfSYlsGwWUWkQ=";
};
cargoHash = "";
cargoLock.lockFile = ../../other/evremap.Cargo.lock;
postPatch = ''
cp ${../../other/evremap.Cargo.lock} Cargo.lock
'';
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = [ pkgs.libevdev ];
};
in {
{ pkgs, ... }: {
nix.settings = {
trusted-substituters = [
"https://t2linux.cachix.org"
@ -185,10 +166,6 @@ in {
fi
'';
};
evremap = {
script = "${evremap}/bin/evremap remap ${../../other/remaps.toml}";
wantedBy = ["multi-user.target"];
};
};
services.logind.extraConfig = ''