From 212af403dca50aebf8917fe711313e3895fce4ab Mon Sep 17 00:00:00 2001 From: Doloro1978 Date: Wed, 20 May 2026 16:01:36 +0100 Subject: [PATCH] replaces rpi flake with a maintained one --- config/hosts/aspects/doloro-desktop/host.nix | 156 ++++++++++--------- config/hosts/aspects/servers/rpi5.nix | 6 +- config/modules/raspberry-pi.nix | 42 +++-- config/modules/services/registry.nix | 2 +- flake.lock | 118 +++++--------- flake.nix | 2 +- 6 files changed, 144 insertions(+), 182 deletions(-) diff --git a/config/hosts/aspects/doloro-desktop/host.nix b/config/hosts/aspects/doloro-desktop/host.nix index f605c81..14be555 100644 --- a/config/hosts/aspects/doloro-desktop/host.nix +++ b/config/hosts/aspects/doloro-desktop/host.nix @@ -6,93 +6,95 @@ __findFile, lib, ... -}: -{ +}: { den.aspects.desktop = { includes = [ modules.nix ]; - nixos = - { pkgs, config, ... }: - { - boot.loader.grub.enable = true; - boot.loader.grub.device = "nodev"; - boot.loader.grub.devices = [ - "/dev/disk/by-id/nvme-CT1000P2SSD8_2221E632CD1F" - "nodev" - ]; - #boot.loader.efi.canTouchEfiVariables = true; - boot.loader.grub.efiSupport = true; - boot.loader.grub.efiInstallAsRemovable = true; - networking.hostName = "doloroo-main"; # Define your hostname. + nixos = { + pkgs, + config, + ... + }: { + boot.loader.grub.enable = true; + boot.loader.grub.device = "nodev"; + boot.loader.grub.devices = [ + "/dev/disk/by-id/nvme-CT1000P2SSD8_2221E632CD1F" + "nodev" + ]; + #boot.loader.efi.canTouchEfiVariables = true; + boot.loader.grub.efiSupport = true; + boot.loader.grub.efiInstallAsRemovable = true; + networking.hostName = "doloroo-main"; # Define your hostname. - boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = pkgs.linuxPackages_latest; - boot.initrd.verbose = false; - boot.kernelParams = [ - "boot.shell_on_fail" - "rd.systemd.show_status=auto" - ]; + boot.initrd.verbose = false; + boot.kernelParams = [ + "boot.shell_on_fail" + "rd.systemd.show_status=auto" + ]; - services.openssh.enable = true; + services.openssh.enable = true; - networking.networkmanager.enable = true; - networking.firewall.enable = false; + networking.networkmanager.enable = true; + networking.firewall.enable = false; - security.rtkit.enable = true; - - hardware.graphics = { - enable = true; - }; - - services.xserver.videoDrivers = [ "nvidia" ]; - - fileSystems."/mnt/2tb" = { - device = "/dev/disk/by-uuid/0f49aec7-4af2-4f4f-b475-3f4fad2b59c2"; - fsType = "ext4"; - options = [ - # If you don't have this options attribute, it'll default to "defaults" - # boot options for fstab. Search up fstab mount options you can use - "defaults" - "users" # Allows any user to mount and unmount - "nofail" # Prevent system from failing if this drive doesn't mount - "exec" - ]; - }; - services.gnome.gnome-keyring.enable = true; - - hardware.nvidia = { - - # Modesetting is required. - modesetting.enable = true; - - # Nvidia power management. Experimental, and can cause sleep/suspend to fail. - # Enable this if you have graphical corruption issues or application crashes after waking - # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead - # of just the bare essentials. - powerManagement.enable = true; - - # Fine-grained power management. Turns off GPU when not in use. - # Experimental and only works on modern Nvidia GPUs (Turing or newer). - powerManagement.finegrained = false; - # prime.offload.enable = true; - - # Use the NVidia open source kernel module (not to be confused with the - # independent third-party "nouveau" open source driver). - # Support is limited to the Turing and later architectures. Full list of - # supported GPUs is at: - # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus - # Only available from driver 515.43.04+ - open = true; - - # Enable the Nvidia settings menu, - # accessible via `nvidia-settings`. - nvidiaSettings = true; - - # Optionally, you may need to select the appropriate driver version for your specific GPU. - package = config.boot.kernelPackages.nvidiaPackages.stable; - }; + security.rtkit.enable = true; + hardware.graphics = { + enable = true; }; + + services.xserver.videoDrivers = ["nvidia"]; + + fileSystems."/mnt/2tb" = { + device = "/dev/disk/by-uuid/0f49aec7-4af2-4f4f-b475-3f4fad2b59c2"; + fsType = "ext4"; + options = [ + # If you don't have this options attribute, it'll default to "defaults" + # boot options for fstab. Search up fstab mount options you can use + "defaults" + "users" # Allows any user to mount and unmount + "nofail" # Prevent system from failing if this drive doesn't mount + "exec" + ]; + }; + services.gnome.gnome-keyring.enable = true; + + hardware.nvidia = { + # Modesetting is required. + modesetting.enable = true; + + # Nvidia power management. Experimental, and can cause sleep/suspend to fail. + # Enable this if you have graphical corruption issues or application crashes after waking + # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead + # of just the bare essentials. + powerManagement.enable = true; + + # Fine-grained power management. Turns off GPU when not in use. + # Experimental and only works on modern Nvidia GPUs (Turing or newer). + powerManagement.finegrained = false; + # prime.offload.enable = true; + + # Use the NVidia open source kernel module (not to be confused with the + # independent third-party "nouveau" open source driver). + # Support is limited to the Turing and later architectures. Full list of + # supported GPUs is at: + # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus + # Only available from driver 515.43.04+ + open = true; + + # Enable the Nvidia settings menu, + # accessible via `nvidia-settings`. + nvidiaSettings = true; + + # Optionally, you may need to select the appropriate driver version for your specific GPU. + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; + boot.binfmt.emulatedSystems = [ + "aarch64-linux" + ]; + }; }; } diff --git a/config/hosts/aspects/servers/rpi5.nix b/config/hosts/aspects/servers/rpi5.nix index 2aa019f..b2b4fea 100644 --- a/config/hosts/aspects/servers/rpi5.nix +++ b/config/hosts/aspects/servers/rpi5.nix @@ -3,14 +3,14 @@ __findFile, modules, ... -}: -{ +}: { den.aspects.rpi5 = { includes = [ # + ]; nixos = { @@ -23,7 +23,7 @@ 443 8080 ]; - allowedUDPPortRanges = [ ]; + allowedUDPPortRanges = []; }; virtualisation.docker.enable = true; diff --git a/config/modules/raspberry-pi.nix b/config/modules/raspberry-pi.nix index 514eee1..4182fb1 100644 --- a/config/modules/raspberry-pi.nix +++ b/config/modules/raspberry-pi.nix @@ -4,37 +4,33 @@ modules, inputs, ... -}: -{ +}: { flake-file.inputs = { - raspberry-pi-nix.url = "github:nix-community/raspberry-pi-nix"; + raspberry-pi-nix.url = "github:cmyk/raspberry-pi-nix"; }; modules.raspberry-pi = { provides = { "5" = { - nixos = - { pkgs, ... }: - let - rpi-pi = inputs.raspberry-pi-nix; - in - { - imports = [ - rpi-pi.nixosModules.raspberry-pi - rpi-pi.nixosModules.sd-image - ]; + nixos = {pkgs, ...}: let + rpi-pi = inputs.raspberry-pi-nix; + in { + imports = [ + rpi-pi.nixosModules.raspberry-pi + rpi-pi.nixosModules.sd-image + ]; - environment.systemPackages = with pkgs; [ - libraspberrypi - ]; + 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; + 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; - }; + hardware.enableRedistributableFirmware = true; + }; }; }; }; diff --git a/config/modules/services/registry.nix b/config/modules/services/registry.nix index 07dfdaf..129dc1b 100644 --- a/config/modules/services/registry.nix +++ b/config/modules/services/registry.nix @@ -16,7 +16,7 @@ imageDigest = "sha256:85347ed2ecde64161c7a4788a4d7d3dcc9d6f86f7be95834022e3c6a423a945a"; finalImageName = "registry"; finalImageTag = "3"; - sha256 = "sha256-AfPrjUFG1rZ5UWJrYWzjpIg7AIGMqjNIRe1eDuvrOPo"; + sha256 = "sha256-rLG0q/MVVz52veqZuZs5W0Qke6FugXkx7fMe3QnE3gU"; arch = "arm64"; }; in { diff --git a/flake.lock b/flake.lock index ba2c67b..e88ec30 100644 --- a/flake.lock +++ b/flake.lock @@ -154,11 +154,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1779135526, - "narHash": "sha256-glCununz6lmaK5fs2X946HA3EkNxB2JagdAAvInuRYU=", + "lastModified": 1779226674, + "narHash": "sha256-wuOkjI6pRiN4sEn/EPBRnNW5cmcpvd7xtIM8y5LooAs=", "owner": "nix-community", "repo": "disko", - "rev": "d405a179887d52b24c0ddd31e09a150bd1f66779", + "rev": "65fb947964bd44fc0008faf77d1fcb7a9f40bb32", "type": "github" }, "original": { @@ -796,16 +796,16 @@ "libpisp-src": { "flake": false, "locked": { - "lastModified": 1724944683, - "narHash": "sha256-Fo2UJmQHS855YSSKKmGrsQnJzXog1cdpkIOO72yYAM4=", + "lastModified": 1740559338, + "narHash": "sha256-tHfFcNSmXLcUHhqiGRh2YZT8xioUq0zMOMZl9rjG8ys=", "owner": "raspberrypi", "repo": "libpisp", - "rev": "28196ed6edcfeda88d23cc5f213d51aa6fa17bb3", + "rev": "50426319aa1a9ba4672f91977429365ad4e335a2", "type": "github" }, "original": { "owner": "raspberrypi", - "ref": "v1.0.7", + "ref": "v1.2.0", "repo": "libpisp", "type": "github" } @@ -914,11 +914,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1773628058, - "narHash": "sha256-hpXH0z3K9xv0fHaje136KY872VT2T5uwxtezlAskQgY=", + "lastModified": 1778036283, + "narHash": "sha256-62EWg6lI0qyzm7oAx5cAnGkLutvJsRBe0KkEW2JDZCE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f8573b9c935cfaa162dd62cc9e75ae2db86f85df", + "rev": "ed67bc86e84e51d4a88e73c7fd36006dc876476f", "type": "github" }, "original": { @@ -1051,11 +1051,11 @@ }, "nixpkgs_8": { "locked": { - "lastModified": 1736061677, - "narHash": "sha256-DjkQPnkAfd7eB522PwnkGhOMuT9QVCZspDpJJYyOj60=", + "lastModified": 1745279238, + "narHash": "sha256-AQ7M9wTa/Pa/kK5pcGTgX/DGqMHyzsyINfN7ktsI7Fo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cbd8ec4de4469333c82ff40d057350c30e9f7d36", + "rev": "9684b53175fc6c09581e94cc85f05ab77464c7e3", "type": "github" }, "original": { @@ -1085,11 +1085,11 @@ "systems": "systems_4" }, "locked": { - "lastModified": 1779199181, - "narHash": "sha256-8x/CeqkYNAAOY+Pa5Huyh0aiUmFcOUAyq3VdYxHb5K4=", + "lastModified": 1779231450, + "narHash": "sha256-5YgsQE2pzHw1YLiemIo55tQDWEeI7Og1n2D/X77kP2A=", "owner": "nix-community", "repo": "nixvim", - "rev": "13ba3f7ca9da3d49e959745f6d0d1e7a662c1984", + "rev": "5de0b035974d6281f0bab3e8ec46015c8ffbeed9", "type": "github" }, "original": { @@ -1128,11 +1128,11 @@ "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1779181830, - "narHash": "sha256-lna281k1C80nwnVN8HqGrVIKReLc6GNlws9TTw7M0N0=", + "lastModified": 1779271700, + "narHash": "sha256-KtWAf0d6xkldTiR4J+m0qDn7uXb8zp/BlLWcHRbRAkg=", "ref": "main", - "rev": "6aee92530f8d6c772499b8ac84f3979ae5c06557", - "revCount": 64, + "rev": "a5095961bde9827989cf4ed2d6efac2781b9ce3e", + "revCount": 66, "type": "git", "url": "https://git.molez.org/mandlm/omp-nix" }, @@ -1173,21 +1173,19 @@ "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", + "rpi-linux-6_12_20-src": "rpi-linux-6_12_20-src", "rpicam-apps-src": "rpicam-apps-src" }, "locked": { - "lastModified": 1742223591, - "narHash": "sha256-ZNTz8r5jlJ1jvpqf5+aUYgpnYJSVX0iP14doOc1Hm0E=", - "owner": "nix-community", + "lastModified": 1745517382, + "narHash": "sha256-yGuXArSvZ1AKOY6ufWbO3YNwYYMsYUk6aXOEYeYIJgk=", + "owner": "cmyk", "repo": "raspberry-pi-nix", - "rev": "3e8100d5e976a6a2be363015cb33463af9ef441a", + "rev": "79d5db180b4e933389affeee0c8959ae5975c5c3", "type": "github" }, "original": { - "owner": "nix-community", + "owner": "cmyk", "repo": "raspberry-pi-nix", "type": "github" } @@ -1220,11 +1218,11 @@ "rpi-bluez-firmware-src": { "flake": false, "locked": { - "lastModified": 1708969706, - "narHash": "sha256-KakKnOBeWxh0exu44beZ7cbr5ni4RA9vkWYb9sGMb8Q=", + "lastModified": 1741017538, + "narHash": "sha256-t+D4VUfEIov83KV4wiKp6TqXTHXGkxg/mANi4GW7QHs=", "owner": "RPi-Distro", "repo": "bluez-firmware", - "rev": "78d6a07730e2d20c035899521ab67726dc028e1c", + "rev": "2bbfb8438e824f5f61dae3f6ebb367a6129a4d63", "type": "github" }, "original": { @@ -1237,11 +1235,11 @@ "rpi-firmware-nonfree-src": { "flake": false, "locked": { - "lastModified": 1723266537, - "narHash": "sha256-T7eTKXqY9cxEMdab8Snda4CEOrEihy5uOhA6Fy+Mhnw=", + "lastModified": 1741707399, + "narHash": "sha256-n2u6dnFGVUDfUBXR+xL+k6A78JThMJc2rDjvWblReEY=", "owner": "RPi-Distro", "repo": "firmware-nonfree", - "rev": "4b356e134e8333d073bd3802d767a825adec3807", + "rev": "3900afffcd85198e3afab396fbf1d0abe5f76173", "type": "github" }, "original": { @@ -1254,68 +1252,34 @@ "rpi-firmware-src": { "flake": false, "locked": { - "lastModified": 1728405098, - "narHash": "sha256-4gnK0KbqFnjBmWia9Jt2gveVWftmHrprpwBqYVqE/k0=", + "lastModified": 1742998042, + "narHash": "sha256-o198RfJe2UUEjtEJnAVMrEG5bQkZca1nzsaUKOKVAQo=", "owner": "raspberrypi", "repo": "firmware", - "rev": "7bbb5f80d20a2335066a8781459c9f33e5eebc64", + "rev": "f49a3960223f20ea0b2e30646f65be67bafe30dc", "type": "github" }, "original": { "owner": "raspberrypi", - "ref": "1.20241008", + "ref": "1.20250326", "repo": "firmware", "type": "github" } }, - "rpi-linux-6_12_17-src": { + "rpi-linux-6_12_20-src": { "flake": false, "locked": { - "lastModified": 1740765145, - "narHash": "sha256-hoCsGc4+RC/2LmxDtswLBL5ZhWlw4vSiL4Vkl39r2MU=", + "lastModified": 1742992765, + "narHash": "sha256-hSlzUXkfsWiE/HsSOEEx9RQlN4lXj2UV8Qgcfq1T5pg=", "owner": "raspberrypi", "repo": "linux", - "rev": "5985ce32e511f4e8279a841a1b06a8c7d972b386", + "rev": "cd231d4775b14f228606c09f219b48308f6ab3aa", "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", + "rev": "cd231d4775b14f228606c09f219b48308f6ab3aa", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 7e198b1..390e47e 100644 --- a/flake.nix +++ b/flake.nix @@ -33,7 +33,7 @@ nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"; nixvim.url = "github:nix-community/nixvim"; omp-nix.url = "git+https://git.molez.org/mandlm/omp-nix?ref=main"; - raspberry-pi-nix.url = "github:nix-community/raspberry-pi-nix"; + raspberry-pi-nix.url = "github:cmyk/raspberry-pi-nix"; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs";