Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Commit bacb0f1

Browse files
committed
add pin-kernel option
1 parent e858a13 commit bacb0f1

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

rpi/default.nix

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ in
88

99
options = with lib; {
1010
raspberry-pi-nix = {
11+
pin-kernel = {
12+
enable = mkOption {
13+
default = true;
14+
type = types.bool;
15+
description = ''
16+
Whether to pin the kernel to the latest cachix build.
17+
'';
18+
};
19+
};
1120
firmware-migration-service = {
1221
enable = mkOption {
1322
default = true;
@@ -275,7 +284,10 @@ in
275284
# This pin is not necessary, it would be fine to replace it with
276285
# `pkgs.rpi-kernels.latest.kernel`. It is helpful to ensure
277286
# cache hits for kernel builds though.
278-
kernelPackages = pinned.linuxPackagesFor (pinned.rpi-kernels.latest.kernel);
287+
kernelPackages =
288+
if cfg.pin-kernel.enable
289+
then pinned.linuxPackagesFor (pinned.rpi-kernels.latest.kernel)
290+
else pkgs.linuxPackagesFor (pkgs.rpi-kernels.latest.kernel);
279291

280292
loader = {
281293
grub.enable = lib.mkDefault false;

0 commit comments

Comments
 (0)