flake: add zremap, hosts: update

This commit is contained in:
Asmir A 2023-09-20 19:43:01 +02:00
parent a16f26e597
commit 794e304ab8
2 changed files with 17 additions and 10 deletions

View File

@ -8,6 +8,7 @@
caps2esc, caps2esc,
nix-xilinx, nix-xilinx,
sops-nix, sops-nix,
zremap,
... ...
}: { }: {
imports = []; imports = [];
@ -18,6 +19,9 @@
sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"]; sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
sops.secrets."peerix/private" = { sops.secrets."peerix/private" = {
sopsFile = ./secrets/peerix.yaml; sopsFile = ./secrets/peerix.yaml;
mode = "0400";
owner = config.users.users.nobody.name;
group = config.users.users.nobody.group;
}; };
nix = { nix = {
@ -76,12 +80,11 @@
dhcpcd.extraConfig = "nohook resolv.conf"; dhcpcd.extraConfig = "nohook resolv.conf";
extraHosts = '' extraHosts = ''
192.168.88.230 mediabox.lan 192.168.88.171 jellyfin.mediabox.lan
192.168.88.230 jellyfin.mediabox.lan 192.168.88.171 mediabox.lan
192.168.88.230 deluge.mediabox.lan 192.168.88.171 qbittorrent.mediabox.lan
192.168.88.230 binarycache.mediabox.lan
192.168.88.231 workstation.lan
192.168.88.1 router.lan 192.168.88.1 router.lan
192.168.88.231 workstation.lan
''; '';
networkmanager = { networkmanager = {
@ -127,17 +130,15 @@
# List services that you want to enable: # List services that you want to enable:
systemd = { systemd = {
services = { services = {
"caps2esc" = { "zremap" = {
description = "Intercepts keyboard udev events"; description = "Intercepts keyboard udev events";
wants = ["systemd-udevd.service"]; wants = ["systemd-udevd.service"];
wantedBy = ["multi-user.target"]; wantedBy = ["multi-user.target"];
serviceConfig.Nice = -20; serviceConfig.Nice = -20;
script = '' script = ''
sleep 1 sleep 1
${pkgs.interception-tools}/bin/intercept \ ${zremap.defaultPackage.x86_64-linux}/bin/zremap \
-g /dev/input/by-path/platform-i8042-serio-0-event-kbd | \ /dev/input/by-path/platform-i8042-serio-0-event-kbd
${caps2esc.defaultPackage.x86_64-linux}/bin/caps2esc | ${pkgs.interception-tools}/bin/uinput \
-d /dev/input/by-path/platform-i8042-serio-0-event-kbd \
''; '';
}; };
}; };

View File

@ -7,6 +7,11 @@
nix-xilinx.url = "gitlab:asmir.abdulahovic/nix-xilinx"; nix-xilinx.url = "gitlab:asmir.abdulahovic/nix-xilinx";
peerix.url = "gitlab:asmir.abdulahovic/peerix"; peerix.url = "gitlab:asmir.abdulahovic/peerix";
zremap = {
url = "gitlab:asmir.abdulahovic/zremap";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = { sops-nix = {
url = "github:Mic92/sops-nix"; url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -25,6 +30,7 @@
nix-xilinx, nix-xilinx,
peerix, peerix,
sops-nix, sops-nix,
zremap,
... ...
}: let }: let
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs; pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;