Files
nixos/modules/temp-build-storage.nix
T
Joakim Repomaa 3000b10cb6
Build Images / build (push) Successful in 1m26s
Check / check (push) Failing after 3m7s
turny: fix SPI/GPIO config for newer kernels
- 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
2026-07-05 01:36:01 +03:00

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;
};
}