mirror of
https://github.com/nix-community/raspberry-pi-nix.git
synced 2025-11-08 19:46:03 +01:00
pin kernel
This commit is contained in:
parent
b39b556e8a
commit
8fc9cbd3e4
2 changed files with 26 additions and 11 deletions
30
flake.nix
30
flake.nix
|
|
@ -2,6 +2,7 @@
|
||||||
description = "raspberry-pi nixos configuration";
|
description = "raspberry-pi nixos configuration";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/9a9960b98418f8c385f52de3b09a63f9c561427a";
|
||||||
u-boot-src = {
|
u-boot-src = {
|
||||||
flake = false;
|
flake = false;
|
||||||
url = "https://ftp.denx.de/pub/u-boot/u-boot-2024.01.tar.bz2";
|
url = "https://ftp.denx.de/pub/u-boot/u-boot-2024.01.tar.bz2";
|
||||||
|
|
@ -36,14 +37,25 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = srcs@{ self, ... }: {
|
outputs = srcs@{ self, ... }:
|
||||||
overlays = {
|
let
|
||||||
core = import ./overlays (builtins.removeAttrs srcs [ "self" ]);
|
pinned = import nixpkgs {
|
||||||
libcamera = import ./overlays/libcamera.nix (builtins.removeAttrs srcs [ "self" ]);
|
system = "aarch64-linux";
|
||||||
|
overlays = with self.overlays; [ core libcamera ];
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
overlays = {
|
||||||
|
core = import ./overlays (builtins.removeAttrs srcs [ "self" ]);
|
||||||
|
libcamera = import ./overlays/libcamera.nix (builtins.removeAttrs srcs [ "self" ]);
|
||||||
|
};
|
||||||
|
nixosModules.raspberry-pi = import ./rpi {
|
||||||
|
inherit pinned;
|
||||||
|
core-overlay = self.overlays.core;
|
||||||
|
libcamera-overlay = self.overlays.libcamera;
|
||||||
|
};
|
||||||
|
packages.aarch64-linux = {
|
||||||
|
linux = pinned.rpi-kernels.latest.kernel;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
nixosModules.raspberry-pi = import ./rpi {
|
|
||||||
core-overlay = self.overlays.core;
|
|
||||||
libcamera-overlay = self.overlays.libcamera;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ core-overlay, libcamera-overlay }:
|
{ pinned, core-overlay, libcamera-overlay }:
|
||||||
{ lib, pkgs, config, ... }:
|
{ lib, pkgs, config, ... }:
|
||||||
|
|
||||||
let cfg = config.raspberry-pi-nix;
|
let cfg = config.raspberry-pi-nix;
|
||||||
|
|
@ -272,7 +272,10 @@ in
|
||||||
"pcie_brcmstb" # required for the pcie bus to work
|
"pcie_brcmstb" # required for the pcie bus to work
|
||||||
"reset-raspberrypi" # required for vl805 firmware to load
|
"reset-raspberrypi" # required for vl805 firmware to load
|
||||||
];
|
];
|
||||||
kernelPackages = pkgs.linuxPackagesFor (pkgs.rpi-kernels.latest.kernel);
|
# This pin is not necessary, it would be fine to replace it with
|
||||||
|
# `pkgs.rpi-kernels.latest.kernel`. It is helpful to ensure
|
||||||
|
# cache hits for kernel builds though.
|
||||||
|
kernelPackages = pinned.linuxPackagesFor (pinned.rpi-kernels.latest.kernel);
|
||||||
|
|
||||||
loader = {
|
loader = {
|
||||||
grub.enable = lib.mkDefault false;
|
grub.enable = lib.mkDefault false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue