diff --git a/flake.lock b/flake.lock index 7bf7be7..84e69bf 100644 --- a/flake.lock +++ b/flake.lock @@ -33,6 +33,22 @@ "type": "github" } }, + "argononed": { + "flake": false, + "locked": { + "lastModified": 1729566243, + "narHash": "sha256-DPNI0Dpk5aym3Baf5UbEe5GENDrSmmXVdriRSWE+rgk=", + "owner": "nvmd", + "repo": "argononed", + "rev": "16dbee54d49b66d5654d228d1061246b440ef7cf", + "type": "github" + }, + "original": { + "owner": "nvmd", + "repo": "argononed", + "type": "github" + } + }, "base16": { "inputs": { "fromYaml": "fromYaml" @@ -170,6 +186,21 @@ } }, "flake-compat_2": { + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { "flake": false, "locked": { "lastModified": 1765121682, @@ -756,6 +787,40 @@ "type": "github" } }, + "libcamera-src": { + "flake": false, + "locked": { + "lastModified": 1725630279, + "narHash": "sha256-KH30jmHfxXq4j2CL7kv18DYECJRp9ECuWNPnqPZajPA=", + "owner": "raspberrypi", + "repo": "libcamera", + "rev": "69a894c4adad524d3063dd027f5c4774485cf9db", + "type": "github" + }, + "original": { + "owner": "raspberrypi", + "repo": "libcamera", + "rev": "69a894c4adad524d3063dd027f5c4774485cf9db", + "type": "github" + } + }, + "libpisp-src": { + "flake": false, + "locked": { + "lastModified": 1724944683, + "narHash": "sha256-Fo2UJmQHS855YSSKKmGrsQnJzXog1cdpkIOO72yYAM4=", + "owner": "raspberrypi", + "repo": "libpisp", + "rev": "28196ed6edcfeda88d23cc5f213d51aa6fa17bb3", + "type": "github" + }, + "original": { + "owner": "raspberrypi", + "ref": "v1.0.7", + "repo": "libpisp", + "type": "github" + } + }, "neovim-nightly-overlay": { "inputs": { "flake-parts": "flake-parts", @@ -813,15 +878,16 @@ }, "nix-meow": { "locked": { - "lastModified": 1760558110, - "narHash": "sha256-mlVxLzq/q9gxhUFsTF47smxhDPheFiShVP9X1qPrlmw=", - "ref": "refs/heads/main", - "rev": "2acc4cbc965397774f4d6c2c1dea70b416fecc8d", - "revCount": 13, + "lastModified": 1769024298, + "narHash": "sha256-f+6ibC7Aj/ubjwnci6GLVaSezpZelXrQZbKzn9HDvIo=", + "ref": "paws", + "rev": "2f97fc4d2d9b23106afd3ee544db0789982ad694", + "revCount": 14, "type": "git", "url": "https://git.scug.io/nikkuss/nix-meow.git" }, "original": { + "ref": "paws", "type": "git", "url": "https://git.scug.io/nikkuss/nix-meow.git" } @@ -846,26 +912,58 @@ "type": "github" } }, - "nixos-hardware": { + "nixos-images": { + "inputs": { + "nixos-stable": [ + "nixos-raspberrypi", + "nixpkgs" + ], + "nixos-unstable": [ + "nixos-raspberrypi", + "nixpkgs" + ] + }, "locked": { - "lastModified": 1768736227, - "narHash": "sha256-qgGq7CfrYKc3IBYQ7qp0Z/ZXndQVC5Bj0N8HW9mS2rM=", - "owner": "NixOS", - "repo": "nixos-hardware", - "rev": "d447553bcbc6a178618d37e61648b19e744370df", + "lastModified": 1747747741, + "narHash": "sha256-LUOH27unNWbGTvZFitHonraNx0JF/55h30r9WxqrznM=", + "owner": "nvmd", + "repo": "nixos-images", + "rev": "cbbd6db325775096680b65e2a32fb6187c09bbb4", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "master", - "repo": "nixos-hardware", + "owner": "nvmd", + "ref": "sdimage-installer", + "repo": "nixos-images", + "type": "github" + } + }, + "nixos-raspberrypi": { + "inputs": { + "argononed": "argononed", + "flake-compat": "flake-compat_2", + "nixos-images": "nixos-images", + "nixpkgs": "nixpkgs_7" + }, + "locked": { + "lastModified": 1768599442, + "narHash": "sha256-y3HowshuCKVBjBFoDeVSz+LwqBIgELt17o1AcwbVl34=", + "owner": "nvmd", + "repo": "nixos-raspberrypi", + "rev": "debda1e1c80544a78157353225013afff2343034", + "type": "github" + }, + "original": { + "owner": "nvmd", + "ref": "develop", + "repo": "nixos-raspberrypi", "type": "github" } }, "nixos-wsl": { "inputs": { - "flake-compat": "flake-compat_2", - "nixpkgs": "nixpkgs_7" + "flake-compat": "flake-compat_3", + "nixpkgs": "nixpkgs_8" }, "locked": { "lastModified": 1768404695, @@ -912,6 +1010,38 @@ } }, "nixpkgs_10": { + "locked": { + "lastModified": 1762977756, + "narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1736061677, + "narHash": "sha256-DjkQPnkAfd7eB522PwnkGhOMuT9QVCZspDpJJYyOj60=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "cbd8ec4de4469333c82ff40d057350c30e9f7d36", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_12": { "locked": { "lastModified": 1765472234, "narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=", @@ -927,7 +1057,7 @@ "type": "github" } }, - "nixpkgs_11": { + "nixpkgs_13": { "locked": { "lastModified": 1768564909, "narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=", @@ -1023,6 +1153,22 @@ } }, "nixpkgs_7": { + "locked": { + "lastModified": 1768599367, + "narHash": "sha256-Wi4Wv7ltAAj7Ik8PGJkpUmpjO+K4eRZsWAEYrDd37YA=", + "owner": "nvmd", + "repo": "nixpkgs", + "rev": "c5f954e9abf64be4b07415cad77f8a4965a7bffb", + "type": "github" + }, + "original": { + "owner": "nvmd", + "ref": "modules-with-keys-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { "locked": { "lastModified": 1765472234, "narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=", @@ -1038,29 +1184,13 @@ "type": "github" } }, - "nixpkgs_8": { - "locked": { - "lastModified": 1768564909, - "narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_9": { "locked": { - "lastModified": 1762977756, - "narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=", + "lastModified": 1768886240, + "narHash": "sha256-C2TjvwYZ2VDxYWeqvvJ5XPPp6U7H66zeJlRaErJKoEM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55", + "rev": "80e4adbcf8992d3fd27ad4964fbb84907f9478b0", "type": "github" }, "original": { @@ -1142,7 +1272,7 @@ }, "protonhax": { "inputs": { - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_10" }, "locked": { "lastModified": 1763234812, @@ -1178,6 +1308,33 @@ "url": "https://git.outfoxxed.me/outfoxxed/quickshell" } }, + "raspberry-pi-nix": { + "inputs": { + "libcamera-src": "libcamera-src", + "libpisp-src": "libpisp-src", + "nixpkgs": "nixpkgs_11", + "rpi-bluez-firmware-src": "rpi-bluez-firmware-src", + "rpi-firmware-nonfree-src": "rpi-firmware-nonfree-src", + "rpi-firmware-src": "rpi-firmware-src", + "rpi-linux-6_12_17-src": "rpi-linux-6_12_17-src", + "rpi-linux-6_6_78-src": "rpi-linux-6_6_78-src", + "rpi-linux-stable-src": "rpi-linux-stable-src", + "rpicam-apps-src": "rpicam-apps-src" + }, + "locked": { + "lastModified": 1742223591, + "narHash": "sha256-ZNTz8r5jlJ1jvpqf5+aUYgpnYJSVX0iP14doOc1Hm0E=", + "owner": "nix-community", + "repo": "raspberry-pi-nix", + "rev": "3e8100d5e976a6a2be363015cb33463af9ef441a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "raspberry-pi-nix", + "type": "github" + } + }, "root": { "inputs": { "disko": "disko", @@ -1190,13 +1347,15 @@ "nikkuss-pkgs": "nikkuss-pkgs", "nix-meow": "nix-meow", "nix-warez": "nix-warez", - "nixos-hardware": "nixos-hardware", + "nixos-raspberrypi": "nixos-raspberrypi", "nixos-wsl": "nixos-wsl", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_9", "nixpkgs-gamescope": "nixpkgs-gamescope", "nixvim": "nixvim", "protonhax": "protonhax", "quickshell": "quickshell", + "raspberry-pi-nix": "raspberry-pi-nix", + "rpi-nixpkgs": "rpi-nixpkgs", "rsRPC": "rsRPC", "sops-nix": "sops-nix", "spicetify-nix": "spicetify-nix", @@ -1204,11 +1363,146 @@ "zen-browser": "zen-browser" } }, + "rpi-bluez-firmware-src": { + "flake": false, + "locked": { + "lastModified": 1708969706, + "narHash": "sha256-KakKnOBeWxh0exu44beZ7cbr5ni4RA9vkWYb9sGMb8Q=", + "owner": "RPi-Distro", + "repo": "bluez-firmware", + "rev": "78d6a07730e2d20c035899521ab67726dc028e1c", + "type": "github" + }, + "original": { + "owner": "RPi-Distro", + "ref": "bookworm", + "repo": "bluez-firmware", + "type": "github" + } + }, + "rpi-firmware-nonfree-src": { + "flake": false, + "locked": { + "lastModified": 1723266537, + "narHash": "sha256-T7eTKXqY9cxEMdab8Snda4CEOrEihy5uOhA6Fy+Mhnw=", + "owner": "RPi-Distro", + "repo": "firmware-nonfree", + "rev": "4b356e134e8333d073bd3802d767a825adec3807", + "type": "github" + }, + "original": { + "owner": "RPi-Distro", + "ref": "bookworm", + "repo": "firmware-nonfree", + "type": "github" + } + }, + "rpi-firmware-src": { + "flake": false, + "locked": { + "lastModified": 1728405098, + "narHash": "sha256-4gnK0KbqFnjBmWia9Jt2gveVWftmHrprpwBqYVqE/k0=", + "owner": "raspberrypi", + "repo": "firmware", + "rev": "7bbb5f80d20a2335066a8781459c9f33e5eebc64", + "type": "github" + }, + "original": { + "owner": "raspberrypi", + "ref": "1.20241008", + "repo": "firmware", + "type": "github" + } + }, + "rpi-linux-6_12_17-src": { + "flake": false, + "locked": { + "lastModified": 1740765145, + "narHash": "sha256-hoCsGc4+RC/2LmxDtswLBL5ZhWlw4vSiL4Vkl39r2MU=", + "owner": "raspberrypi", + "repo": "linux", + "rev": "5985ce32e511f4e8279a841a1b06a8c7d972b386", + "type": "github" + }, + "original": { + "owner": "raspberrypi", + "ref": "rpi-6.12.y", + "repo": "linux", + "type": "github" + } + }, + "rpi-linux-6_6_78-src": { + "flake": false, + "locked": { + "lastModified": 1740503700, + "narHash": "sha256-Y8+ot4Yi3UKwlZK3ap15rZZ16VZDvmeFkD46+6Ku7bE=", + "owner": "raspberrypi", + "repo": "linux", + "rev": "2e071057fded90e789c0101498e45a1778be93fe", + "type": "github" + }, + "original": { + "owner": "raspberrypi", + "ref": "rpi-6.6.y", + "repo": "linux", + "type": "github" + } + }, + "rpi-linux-stable-src": { + "flake": false, + "locked": { + "lastModified": 1728403745, + "narHash": "sha256-phCxkuO+jUGZkfzSrBq6yErQeO2Td+inIGHxctXbD5U=", + "owner": "raspberrypi", + "repo": "linux", + "rev": "5aeecea9f4a45248bcf564dec924965e066a7bfd", + "type": "github" + }, + "original": { + "owner": "raspberrypi", + "ref": "stable_20241008", + "repo": "linux", + "type": "github" + } + }, + "rpi-nixpkgs": { + "locked": { + "lastModified": 1768599367, + "narHash": "sha256-Wi4Wv7ltAAj7Ik8PGJkpUmpjO+K4eRZsWAEYrDd37YA=", + "owner": "nvmd", + "repo": "nixpkgs", + "rev": "c5f954e9abf64be4b07415cad77f8a4965a7bffb", + "type": "github" + }, + "original": { + "owner": "nvmd", + "ref": "modules-with-keys-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "rpicam-apps-src": { + "flake": false, + "locked": { + "lastModified": 1727515047, + "narHash": "sha256-qCYGrcibOeGztxf+sd44lD6VAOGoUNwRqZDdAmcTa/U=", + "owner": "raspberrypi", + "repo": "rpicam-apps", + "rev": "a8ccf9f3cd9df49875dfb834a2b490d41d226031", + "type": "github" + }, + "original": { + "owner": "raspberrypi", + "ref": "v1.5.2", + "repo": "rpicam-apps", + "type": "github" + } + }, "rsRPC": { "inputs": { "crane": "crane", "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_10" + "nixpkgs": "nixpkgs_12" }, "locked": { "lastModified": 1765636609, @@ -1246,7 +1540,7 @@ }, "spicetify-nix": { "inputs": { - "nixpkgs": "nixpkgs_11", + "nixpkgs": "nixpkgs_13", "systems": "systems_7" }, "locked": { diff --git a/flake.nix b/flake.nix index ccda49d..afa17f8 100644 --- a/flake.nix +++ b/flake.nix @@ -3,13 +3,14 @@ inputs = { # Specify the source of Home Manager and Nixpkgs. - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + rpi-nixpkgs.url = "github:nvmd/nixpkgs/modules-with-keys-25.11"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; - nix-meow.url = "git+https://git.scug.io/nikkuss/nix-meow.git"; # config manager, meow'd + nix-meow.url = "git+https://git.scug.io/nikkuss/nix-meow.git?ref=paws"; # config manager, meow'd hyprland.url = "github:hyprwm/Hyprland"; rsRPC.url = "github:Doloro1978/rsRPC"; protonhax.url = "github:linusfri/protonhax-nix"; @@ -63,7 +64,8 @@ url = "github:Nixos/nixpkgs?rev=8fcb6f1c4948305af52d19f887b89011ee2c080d"; }; font-patcher.url = "github:Doloro1978/nix-nerd-fonts-patcher"; - nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + nixos-raspberrypi.url = "github:nvmd/nixos-raspberrypi/develop"; + raspberry-pi-nix.url = "github:nix-community/raspberry-pi-nix"; }; outputs = inputs@{ @@ -180,6 +182,7 @@ hardware = "rpi-5"; host = "rpi-5"; system = "aarch64-linux"; + # nixpkgs = inputs.rpi-nixpkgs; stateVersion = "25.11"; nixpkgsConfig = { rocmSupport = false; diff --git a/hardwares/rpi-5/nixos.nix b/hardwares/rpi-5/nixos.nix index f98eeae..10328ac 100644 --- a/hardwares/rpi-5/nixos.nix +++ b/hardwares/rpi-5/nixos.nix @@ -7,16 +7,15 @@ { imports = [ # ./disks.nix - inputs.nixos-hardware.nixosModules.raspberry-pi-4 - (modulesPath + "/installer/sd-card/sd-image-aarch64.nix") + # (modulesPath + "/installer/sd-card/sd-image-aarch64.nix") ]; - fileSystems = { - "/" = { - device = "/dev/disk/by-label/NIXOS_SD"; - fsType = "ext4"; - options = [ "noatime" ]; - }; - }; + # fileSystems = { + # "/" = { + # device = "/dev/disk/by-label/NIXOS_SD"; + # fsType = "ext4"; + # options = [ "noatime" ]; + # }; + # }; boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" diff --git a/hosts/rpi-5/nixos.nix b/hosts/rpi-5/nixos.nix index 586e8a9..9c3377a 100644 --- a/hosts/rpi-5/nixos.nix +++ b/hosts/rpi-5/nixos.nix @@ -2,9 +2,22 @@ lib, pkgs, inputs, + config, ... }: +let + rpi-pi = inputs.raspberry-pi-nix; +in { + imports = [ + rpi-pi.nixosModules.raspberry-pi + rpi-pi.nixosModules.sd-image + ]; + nix.settings = { + substituters = [ "https://nix-community.cachix.org" ]; + trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; + }; + users = { mutableUsers = false; users.doloro = { @@ -16,23 +29,22 @@ ]; }; }; + users.users.root.initialPassword = "root"; networking.hostName = "nixos-001-rp5"; services.openssh.enable = true; - boot = { - kernelPackages = pkgs.linuxKernel.packages.linux_rpi4; - initrd.availableKernelModules = [ - "xhci_pci" - "usbhid" - "usb_storage" - ]; - loader = { - grub.enable = false; - generic-extlinux-compatible.enable = true; - }; - }; + environment.systemPackages = with pkgs; [ + libraspberrypi + ]; + + sdImage.compressImage = false; + + raspberry-pi-nix.board = "bcm2712"; # Rpi 5 - 64bit + # We need to rebuild kernel for 6.12 + # raspberry-pi-nix.kernel-version = "v6_12_17"; + raspberry-pi-nix.uboot.enable = false; hardware.enableRedistributableFirmware = true; system.stateVersion = "25.11";