repositories

NixDaemon

NixOS pentest workstation as one flake — IceBreaker's successor

clonegit clone https://git.daemon-sec.xyz/NixDaemon.git
toolbox.nixNix36 lines1.4 KiBraw download
# modules/hosts/laptop/toolbox.nix
#
# NixOS-side support for the hand-written toolbox that lives, flat, in
# ~/.local/bin (its own git repo; not in the Nix store). Shared by the target
# and the bootstrap configuration.
{ ... }:
{
  flake.nixosModules.laptop-toolbox =
  { pkgs, lib, user, ... }:
  {
    # Several tools keep Arch-style shebangs (#!/bin/bash: fanfix, dropterm,
    # omarchy-menu-*; #!/usr/bin/python3: lid-control). envfs resolves those
    # paths from the caller's PATH instead of patching the scripts.
    services.envfs.enable = true;

    # ~/.local/bin first on PATH (prepends in /etc/set-environment).
    environment.localBinInPath = true;

    # Not `input`: that group reads every /dev/input/event* node, so any
    # process running as the user could log keystrokes, sudo and LUKS
    # passphrases included. padx needs exactly one hidraw device, so it gets a
    # group of its own that owns only that node.
    users.groups.padx = { };
    users.users.${user}.extraGroups = [
      "padx" # padx talks to the touchpad over hidraw
      "video"
    ];

    # padx: the Pixart 093A:0274 touchpad behind the UNIW0001 I2C-HID bridge.
    # Replaces ~/trackpad-fix/60-padx-touchpad.rules from the Arch install.
    services.udev.extraRules = ''
      KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{modalias}=="hid:b0018g*v0000093Ap00000274", GROUP="padx", MODE="0660"
    '';
  }
  ;
}