summary refs log tree commit diff
path: root/machines/fourmi/devices.nix
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2026-07-18 18:51:08 +0200
committerMel <mel@rnrd.eu>2026-07-18 18:51:08 +0200
commit7672318e8435164746e0a0d9a4def8be6820c3fa (patch)
tree12e5828f236399e7d46afeafa0637dd7a9e90646 /machines/fourmi/devices.nix
parent72a3bfd94fd0dd0983d55e25fd831864e0194f12 (diff)
downloadnetwork-7672318e8435164746e0a0d9a4def8be6820c3fa.tar.zst
network-7672318e8435164746e0a0d9a4def8be6820c3fa.zip
Add support for fourmi display via custom DRM kernel driver flake
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'machines/fourmi/devices.nix')
-rw-r--r--machines/fourmi/devices.nix16
1 files changed, 11 insertions, 5 deletions
diff --git a/machines/fourmi/devices.nix b/machines/fourmi/devices.nix
index 56d243f..1e55692 100644
--- a/machines/fourmi/devices.nix
+++ b/machines/fourmi/devices.nix
@@ -3,6 +3,7 @@
   pkgs,
   lib,
   nixos-hardware,
+  mhs35-drm,
   ...
 }:
 
@@ -10,10 +11,16 @@
   # correctly configure hardware in this pi server.
   imports = [
     nixos-hardware.nixosModules.raspberry-pi-4
-    ../../modules/hardware/ads7846.nix
-    #../../modules/hardware/ili9486.nix
+    mhs35-drm.nixosModules.default
   ];
 
+  # gpio display visualizing the goings-on on fourmi!
+  # this is a weird offbrand ili9486 (maybe?) 3.5" spi panel
+  # with an ads7846 touch screen which is not actually compatible
+  # with the normal drm driver, so we have our own!
+  # see the flake input and associated repo for more!
+  hardware.mhs35.enable = true;
+
   # boot settings
   boot = {
     kernelPackages = lib.mkForce pkgs.linuxPackages_rpi4;
@@ -37,7 +44,8 @@
   # apply rpi4-specific device tree from nixos-hardware.
   hardware = {
     raspberry-pi."4" = {
-      apply-overlays-dtmerge.enable = true;
+      # applied in our flake as per-machine overlay.
+      apply-overlays-dtmerge.enable = false;
       fkms-3d.enable = true;
     };
     deviceTree = {
@@ -66,13 +74,11 @@
         name = "end0";
         DHCP = "yes";
         dhcpV4Config.RouteMetric = 100;
-        networkConfig.RequiredForOnline = "no";
       };
       "20-wireless" = {
         name = "wlan0";
         DHCP = "yes";
         dhcpV4Config.RouteMetric = 600;
-        networkConfig.RequiredForOnline = "no";
       };
     };
   };