From 1bb202d01783f95a94db16d4c75706475e26f799 Mon Sep 17 00:00:00 2001 From: Petru Paler Date: Tue, 28 Oct 2025 10:59:16 +0000 Subject: [PATCH] Add nixos-hardware flake for stinky. --- flake.lock | 17 +++++++++++++++++ flake.nix | 7 ++++++- hosts/stinky/default.nix | 9 +++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index c380c1b..d777249 100644 --- a/flake.lock +++ b/flake.lock @@ -745,6 +745,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1760958188, + "narHash": "sha256-2m1S4jl+GEDtlt2QqeHil8Ny456dcGSKJAM7q3j/BFU=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "d6645c340ef7d821602fd2cd199e8d1eed10afbc", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1761016216, @@ -943,6 +959,7 @@ "home-manager": "home-manager", "impermanence": "impermanence", "nix-index-database": "nix-index-database", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable_2", "nixvim": "nixvim", diff --git a/flake.nix b/flake.nix index 92144be..bc08cf9 100644 --- a/flake.nix +++ b/flake.nix @@ -38,6 +38,7 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; }; outputs = @@ -53,6 +54,7 @@ sops-nix, browser-previews, omarchy-nix, + nixos-hardware, ... }@inputs: let @@ -163,7 +165,10 @@ ]; chilly = mkHost "x86_64-linux" "workstation" [ ./hosts/chilly ]; sparky = mkHost "x86_64-linux" "desktop" [ ./hosts/sparky ]; - stinky = mkHost "aarch64-linux" "minimal" [ ./hosts/stinky ]; + stinky = mkHost "aarch64-linux" "minimal" [ + nixos-hardware.nixosModules.raspberry-pi-4 + ./hosts/stinky + ]; }; deploy = { diff --git a/hosts/stinky/default.nix b/hosts/stinky/default.nix index a49f613..82f2542 100644 --- a/hosts/stinky/default.nix +++ b/hosts/stinky/default.nix @@ -15,6 +15,14 @@ ./hardware.nix ]; + hardware = { + raspberry-pi."4".apply-overlays-dtmerge.enable = true; + deviceTree = { + enable = true; + filter = "*rpi-4-*.dtb"; + }; + }; + networking.hostName = "stinky"; # Configure impermanence for tmpfs root (filesystem config in hardware.nix) @@ -39,6 +47,7 @@ environment.systemPackages = with pkgs; [ libcamera libraspberrypi + raspberrypi-eeprom ]; # Firewall: Allow access to OctoPrint