pi
This commit is contained in:
@@ -233,6 +233,7 @@ in
|
||||
./audio.nix
|
||||
./bluetooth.nix
|
||||
./config.nix
|
||||
./overlays
|
||||
./i2c.nix
|
||||
./leds.nix
|
||||
./modesetting.nix
|
||||
|
||||
@@ -12,11 +12,34 @@ in
|
||||
enable = lib.mkEnableOption "Disable wifi on Pi5";
|
||||
overlay = mkOpt types.str "${firmware}/boot/overlays/disable-wifi-pi5.dtbo" "Location of the dtbo file";
|
||||
};
|
||||
|
||||
pi5DisableBluetooth = {
|
||||
enable = lib.mkEnableOption "Disable bluetooth on Pi5";
|
||||
overlay = mkOpt types.str "${firmware}/boot/overlays/disable-bt-pi5.dtbo" "Location of the dtbo file";
|
||||
};
|
||||
|
||||
pi5i2c0 = {
|
||||
enable = lib.mkEnableOption "Disable pi5i2c0 on Pi5";
|
||||
overlay = mkOpt types.str "${firmware}/boot/overlays/i2c0-pi5.dtbo" "Location of the dtbo file";
|
||||
};
|
||||
|
||||
pi5i2c1 = {
|
||||
enable = lib.mkEnableOption "Disable pi5i2c1 on Pi5";
|
||||
overlay = mkOpt types.str "${firmware}/boot/overlays/i2c1-pi5.dtbo" "Location of the dtbo file";
|
||||
};
|
||||
|
||||
pi5i2c2 = {
|
||||
enable = lib.mkEnableOption "Disable pi5i2c2 on Pi5";
|
||||
overlay = mkOpt types.str "${firmware}/boot/overlays/i2c2-pi5.dtbo" "Location of the dtbo file";
|
||||
};
|
||||
|
||||
pi5i2c3 = {
|
||||
enable = lib.mkEnableOption "Disable pi5i2c3 on Pi5";
|
||||
overlay = mkOpt types.str "${firmware}/boot/overlays/i2c3-pi5.dtbo" "Location of the dtbo file";
|
||||
};
|
||||
};
|
||||
|
||||
# audremap-pi5.dtbo
|
||||
# disable-bt-pi5.dtbo
|
||||
# disable-wifi-pi5.dtbo
|
||||
# i2c0-pi5.dtbo
|
||||
# i2c1-pi5.dtbo
|
||||
# i2c2-pi5.dtbo
|
||||
@@ -60,6 +83,31 @@ in
|
||||
mkdir ${toString configfsPath}/disable-wifi-pi5
|
||||
cp ${cfg.pi5DisableWifi.overlay} ${configfsPath}/disable-wifi-pi5/dtbo
|
||||
fi
|
||||
|
||||
if [ ${if cfg.pi5DisableBluetooth.enable then "true" else "false"} ]; then
|
||||
mkdir ${toString configfsPath}/disable-bt-pi5
|
||||
cp ${cfg.pi5DisableBluetooth.overlay} ${configfsPath}/disable-bt-pi5/dtbo
|
||||
fi
|
||||
|
||||
if [ ${if cfg.pi5i2c0.enable then "true" else "false"} ]; then
|
||||
mkdir ${toString configfsPath}/i2c0-pi5
|
||||
cp ${cfg.pi5i2c0.overlay} ${configfsPath}/i2c0-pi5/dtbo
|
||||
fi
|
||||
|
||||
if [ ${if cfg.pi5i2c1.enable then "true" else "false"} ]; then
|
||||
mkdir ${toString configfsPath}/i2c1-pi5
|
||||
cp ${cfg.pi5i2c1.overlay} ${configfsPath}/i2c1-pi5/dtbo
|
||||
fi
|
||||
|
||||
if [ ${if cfg.pi5i2c2.enable then "true" else "false"} ]; then
|
||||
mkdir ${toString configfsPath}/i2c2-pi5
|
||||
cp ${cfg.pi5i2c2.overlay} ${configfsPath}/i2c2-pi5/dtbo
|
||||
fi
|
||||
|
||||
if [ ${if cfg.pi5i2c3.enable then "true" else "false"} ]; then
|
||||
mkdir ${toString configfsPath}/i2c3-pi5
|
||||
cp ${cfg.pi5i2c3.overlay} ${configfsPath}/i2c3-pi5/dtbo
|
||||
fi
|
||||
'';
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user