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
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
{
|
||||
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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user