From 986f101a6691f2cdd6f931aa006fc4fe5337ed1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 20 Oct 2020 06:25:14 +0200 Subject: [PATCH] raspberry-2: fix evaluation warning --- raspberry-pi/2/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/raspberry-pi/2/default.nix b/raspberry-pi/2/default.nix index d10bbd2..eca03be 100644 --- a/raspberry-pi/2/default.nix +++ b/raspberry-pi/2/default.nix @@ -1,9 +1,11 @@ { lib, pkgs, ...}: +let + hasConsoleExtraTTYs = lib.versionAtLeast (lib.versions.majorMinor lib.version) "21.03"; +in { boot = { consoleLogLevel = lib.mkDefault 7; - extraTTYs = [ "ttyAMA0" ]; kernelPackages = lib.mkDefault pkgs.linuxPackages_rpi2; kernelParams = [ "dwc_otg.lpm_enable=0" @@ -16,11 +18,14 @@ generationsDir.enable = lib.mkDefault false; raspberryPi = { 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; nixpkgs.config.platform = lib.systems.platforms.raspberrypi2;