mirror of
https://github.com/nix-community/raspberry-pi-nix.git
synced 2025-11-09 12:06:02 +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; {
|
options = with lib; {
|
||||||
raspberry-pi-nix = {
|
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 = {
|
firmware-migration-service = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = true;
|
default = true;
|
||||||
|
|
@ -275,7 +284,10 @@ in
|
||||||
# This pin is not necessary, it would be fine to replace it with
|
# This pin is not necessary, it would be fine to replace it with
|
||||||
# `pkgs.rpi-kernels.latest.kernel`. It is helpful to ensure
|
# `pkgs.rpi-kernels.latest.kernel`. It is helpful to ensure
|
||||||
# cache hits for kernel builds though.
|
# 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 = {
|
loader = {
|
||||||
grub.enable = lib.mkDefault false;
|
grub.enable = lib.mkDefault false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue