22 lines
641 B
Nix
22 lines
641 B
Nix
{ inputs, hostRegistry, options, lib, ... }:
|
|
|
|
let
|
|
enabled = hostRegistry.hosts.${config.networking.hostName} ? raspberryPi &&
|
|
hostRegistry.hosts.${config.networking.hostName}.raspberryPi != null;
|
|
in
|
|
{
|
|
imports = lib.optionals enabled [
|
|
"${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
|
|
];
|
|
config = lib.mkIf enabled {
|
|
sdImage = {
|
|
compressImage = false;
|
|
imageBaseName = config.networking.hostName;
|
|
firmwareSize = 512;
|
|
};
|
|
# Don't build ZFS for aarch64 (broken?)
|
|
boot.supportedFilesystems = lib.mkForce [ "vfat" "ext4" ];
|
|
boot.zfs.enableUnstable = true;
|
|
};
|
|
}
|