mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-27 05:19:43 +01:00
raspberry-2: fix evaluation warning
This commit is contained in:
parent
b3827275b7
commit
986f101a66
1 changed files with 7 additions and 2 deletions
|
@ -1,9 +1,11 @@
|
||||||
{ lib, pkgs, ...}:
|
{ lib, pkgs, ...}:
|
||||||
|
|
||||||
|
let
|
||||||
|
hasConsoleExtraTTYs = lib.versionAtLeast (lib.versions.majorMinor lib.version) "21.03";
|
||||||
|
in
|
||||||
{
|
{
|
||||||
boot = {
|
boot = {
|
||||||
consoleLogLevel = lib.mkDefault 7;
|
consoleLogLevel = lib.mkDefault 7;
|
||||||
extraTTYs = [ "ttyAMA0" ];
|
|
||||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_rpi2;
|
kernelPackages = lib.mkDefault pkgs.linuxPackages_rpi2;
|
||||||
kernelParams = [
|
kernelParams = [
|
||||||
"dwc_otg.lpm_enable=0"
|
"dwc_otg.lpm_enable=0"
|
||||||
|
@ -16,11 +18,14 @@
|
||||||
generationsDir.enable = lib.mkDefault false;
|
generationsDir.enable = lib.mkDefault false;
|
||||||
raspberryPi = {
|
raspberryPi = {
|
||||||
enable = lib.mkDefault true;
|
enable = lib.mkDefault true;
|
||||||
version = lib.mkDefault 2;
|
version = lib.mkDefault 2;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
extraTTYs = lib.mkIf (!hasConsoleExtraTTYs) [ "ttyAMA0" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.extraTTYs = lib.mkIf hasConsoleExtraTTYs [ "ttyAMA0" ];
|
||||||
|
|
||||||
nix.buildCores = 4;
|
nix.buildCores = 4;
|
||||||
|
|
||||||
nixpkgs.config.platform = lib.systems.platforms.raspberrypi2;
|
nixpkgs.config.platform = lib.systems.platforms.raspberrypi2;
|
||||||
|
|
Loading…
Reference in a new issue