- Add complete config.txt settings with u-boot boot lines + spi=on - Override sdImage.populateFirmwareCommands to use configtxt module output - Mount firmware partition and add activation script to sync config.txt - Load spi_bcm2835 and bcm2835_gpiomem kernel modules - Add udev rule for gpiomem subsystem (not just gpio) - Relax ProtectKernelTunables so service can access GPIO - Update turny flake input to rppal-based CS pin fix
39 lines
769 B
Nix
39 lines
769 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.modules.tempBuildStorage;
|
|
in
|
|
{
|
|
options.modules.tempBuildStorage = {
|
|
enable = lib.mkEnableOption "temporary build storage volume";
|
|
|
|
device = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "/dev/sdb";
|
|
description = "Block device to mount for temporary nix build storage.";
|
|
};
|
|
|
|
mountPoint = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "/mnt/build";
|
|
description = "Mount point for the temporary build storage.";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
fileSystems.${cfg.mountPoint} = {
|
|
device = cfg.device;
|
|
fsType = "ext4";
|
|
options = [
|
|
"nofail"
|
|
"defaults"
|
|
];
|
|
};
|
|
|
|
nix.settings.build-dir = cfg.mountPoint;
|
|
};
|
|
}
|