From ade7b63e55837bdab602071e4603bdc1ac8fc7ec Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 1 Feb 2021 19:33:35 +0800 Subject: [PATCH] nixops: enable rpi fans --- nixops/rpi-server.nix | 5 ++++- nixops/rpi.nix | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/nixops/rpi-server.nix b/nixops/rpi-server.nix index cc7baa7..d02a535 100644 --- a/nixops/rpi-server.nix +++ b/nixops/rpi-server.nix @@ -13,7 +13,10 @@ enable = true; version = 4; }; - boot.kernelPackages = pkgs.lib.mkIf rpi4 pkgs.linuxPackages_latest; + boot.kernelPackages = if rpi4 then pkgs.linuxPackages_rpi4 else pkgs.linuxPackages_rpi3; + hardware.deviceTree.enable = true; + hardware.deviceTree.base = pkgs.device-tree_rpi; + hardware.deviceTree.overlays = [ "${pkgs.device-tree_rpi.overlays}/rpi-poe.dtbo" ]; fileSystems = if rpi4 then { "/boot" = { diff --git a/nixops/rpi.nix b/nixops/rpi.nix index 2ff0bf9..8ed56b3 100644 --- a/nixops/rpi.nix +++ b/nixops/rpi.nix @@ -16,7 +16,10 @@ in enable = true; version = 4; }; - boot.kernelPackages = pkgs.lib.mkIf rpi4 pkgs.linuxPackages_latest; + boot.kernelPackages = if rpi4 then pkgs.linuxPackages_rpi4 else pkgs.linuxPackages_rpi3; + hardware.deviceTree.enable = true; + hardware.deviceTree.base = pkgs.device-tree_rpi; + hardware.deviceTree.overlays = [ "${pkgs.device-tree_rpi.overlays}/rpi-poe.dtbo" ]; fileSystems = if rpi4 then { "/boot" = {