diff --git a/configuration.nix b/configuration.nix index 9e99196..1428810 100644 --- a/configuration.nix +++ b/configuration.nix @@ -8,6 +8,7 @@ caps2esc, nix-xilinx, sops-nix, + zremap, ... }: { imports = []; @@ -18,6 +19,9 @@ sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"]; sops.secrets."peerix/private" = { sopsFile = ./secrets/peerix.yaml; + mode = "0400"; + owner = config.users.users.nobody.name; + group = config.users.users.nobody.group; }; nix = { @@ -76,12 +80,11 @@ dhcpcd.extraConfig = "nohook resolv.conf"; extraHosts = '' - 192.168.88.230 mediabox.lan - 192.168.88.230 jellyfin.mediabox.lan - 192.168.88.230 deluge.mediabox.lan - 192.168.88.230 binarycache.mediabox.lan - 192.168.88.231 workstation.lan + 192.168.88.171 jellyfin.mediabox.lan + 192.168.88.171 mediabox.lan + 192.168.88.171 qbittorrent.mediabox.lan 192.168.88.1 router.lan + 192.168.88.231 workstation.lan ''; networkmanager = { @@ -127,17 +130,15 @@ # List services that you want to enable: systemd = { services = { - "caps2esc" = { + "zremap" = { description = "Intercepts keyboard udev events"; wants = ["systemd-udevd.service"]; wantedBy = ["multi-user.target"]; serviceConfig.Nice = -20; script = '' sleep 1 - ${pkgs.interception-tools}/bin/intercept \ - -g /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 \ + ${zremap.defaultPackage.x86_64-linux}/bin/zremap \ + /dev/input/by-path/platform-i8042-serio-0-event-kbd ''; }; }; diff --git a/flake.nix b/flake.nix index 47d447e..fd4e390 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,11 @@ nix-xilinx.url = "gitlab:asmir.abdulahovic/nix-xilinx"; peerix.url = "gitlab:asmir.abdulahovic/peerix"; + zremap = { + url = "gitlab:asmir.abdulahovic/zremap"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -25,6 +30,7 @@ nix-xilinx, peerix, sops-nix, + zremap, ... }: let pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;