check
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
{ config, lib, pkgs, namespace, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.${namespace}.hardware.raspberry-pi.disable-bluetooth;
|
||||
variant = config.${namespace}.hardware.raspberry-pi.variant;
|
||||
@@ -10,21 +16,28 @@ in
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
hardware.deviceTree = {
|
||||
overlays =
|
||||
[ ] ++ (if (variant == "5") then
|
||||
[
|
||||
{
|
||||
name = "disable-bt-pi5-overlay";
|
||||
dtsFile = "${pkgs.${namespace}.raspberrypi-overlays}/dtbs/raspberrypi-overlays/disable-bt-pi5-overlay.dts";
|
||||
}
|
||||
]
|
||||
else
|
||||
[
|
||||
{
|
||||
name = "disable-bt-overlay";
|
||||
dtsFile = "${pkgs.${namespace}.raspberrypi-overlays}/dtbs/raspberrypi-overlays/disable-bt-overlay.dts";
|
||||
}
|
||||
]);
|
||||
overlays =
|
||||
[ ]
|
||||
++ (
|
||||
if (variant == "5") then
|
||||
[
|
||||
{
|
||||
name = "disable-bt-pi5-overlay";
|
||||
dtsFile = "${
|
||||
pkgs.${namespace}.raspberrypi-overlays
|
||||
}/dtbs/raspberrypi-overlays/disable-bt-pi5-overlay.dts";
|
||||
}
|
||||
]
|
||||
else
|
||||
[
|
||||
{
|
||||
name = "disable-bt-overlay";
|
||||
dtsFile = "${
|
||||
pkgs.${namespace}.raspberrypi-overlays
|
||||
}/dtbs/raspberrypi-overlays/disable-bt-overlay.dts";
|
||||
}
|
||||
]
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user