mirror of
https://github.com/nix-community/raspberry-pi-nix.git
synced 2025-11-08 19:46:03 +01:00
add pin-kernel option
This commit is contained in:
parent
e858a137fd
commit
bacb0f119a
1 changed files with 13 additions and 1 deletions
|
|
@ -8,6 +8,15 @@ in
|
|||
|
||||
options = with lib; {
|
||||
raspberry-pi-nix = {
|
||||
pin-kernel = {
|
||||
enable = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to pin the kernel to the latest cachix build.
|
||||
'';
|
||||
};
|
||||
};
|
||||
firmware-migration-service = {
|
||||
enable = mkOption {
|
||||
default = true;
|
||||
|
|
@ -275,7 +284,10 @@ in
|
|||
# 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);
|
||||
kernelPackages =
|
||||
if cfg.pin-kernel.enable
|
||||
then pinned.linuxPackagesFor (pinned.rpi-kernels.latest.kernel)
|
||||
else pkgs.linuxPackagesFor (pkgs.rpi-kernels.latest.kernel);
|
||||
|
||||
loader = {
|
||||
grub.enable = lib.mkDefault false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue