diff --git a/deploy/nixos/hardware/batm3.nix b/deploy/nixos/hardware/batm3.nix new file mode 100644 index 0000000..bedbdc0 --- /dev/null +++ b/deploy/nixos/hardware/batm3.nix @@ -0,0 +1,76 @@ +# BATM3 Hardware Configuration +# HP ProDesk 600 G3 DM, Intel i5-7500T, Intel HD 630 +# Temporary board replacement for GeneralBytes BATM3 (ARM Android → x86 NixOS) + +{ config, lib, pkgs, ... }: + +{ + boot = { + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + timeout = 3; + }; + + initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "usbhid" + "sd_mod" + ]; + + kernelModules = [ + "kvm-intel" + ]; + + kernelParams = [ + "quiet" + "splash" + ]; + }; + + # Disk layout: GPT with ESP (sda1) + ext4 root (sda2) + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-label/ESP"; + fsType = "vfat"; + }; + + hardware = { + opengl = { + enable = true; + extraPackages = with pkgs; [ + intel-media-driver + vaapiIntel + vaapiVdpau + libvdpau-va-gl + ]; + }; + enableRedistributableFirmware = true; + cpu.intel.updateMicrocode = true; + }; + + powerManagement = { + enable = true; + cpuFreqGovernor = "performance"; + }; + + # Disable suspend/hibernate for kiosk + systemd.targets = { + sleep.enable = false; + suspend.enable = false; + hibernate.enable = false; + hybrid-sleep.enable = false; + }; + + # Serial port access for bill validator/dispenser (USB-serial adapters) + services.udev.extraRules = lib.mkAfter '' + KERNEL=="ttyS[0-9]*", MODE="0666" + KERNEL=="ttyUSB[0-9]*", MODE="0666" + KERNEL=="ttyACM[0-9]*", MODE="0666" + ''; +} diff --git a/deploy/push-cache.sh b/deploy/push-cache.sh index 4661f8a..2d05f13 100755 --- a/deploy/push-cache.sh +++ b/deploy/push-cache.sh @@ -40,6 +40,9 @@ case "$target" in build_and_push "sintra live ISO" "iso-sintra" ;; batm3) + build_and_push "batm3-installed toplevel" "nixosConfigurations.batm3-installed.config.system.build.toplevel" + ;; + batm3-live) build_and_push "batm3 live ISO" "iso-batm3" ;; all) diff --git a/flake.nix b/flake.nix index 4843994..48d0dcb 100644 --- a/flake.nix +++ b/flake.nix @@ -225,6 +225,7 @@ # Installed-to-disk configs (proper GPT + systemd-boot, supports nixos-rebuild) douro-installed = mkInstalledConfig "douro" ./deploy/nixos/hardware/douro.nix; tejo-installed = mkInstalledConfig "tejo" ./deploy/nixos/hardware/upboard.nix; + batm3-installed = mkInstalledConfig "batm3" ./deploy/nixos/hardware/batm3.nix; }; # ── Standalone NixOS module ───────────────────────────────────