{
description = "Build image";
inputs.nixpkgs.url = "github:nixos/nixpkgs";
outputs = { self, nixpkgs }: rec {
nixosConfigurations.rpi = nixpkgs.lib.nixosSystem rec {
system = "aarch64-linux";
modules = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
{
boot.kernelPackages = nixpkgs.linuxPackages_latest;
services.pcscd.enable = true;
services.udev.packages = [ nixpkgs.yubikey-personalization ];
environment.systemPackages = [
nixpkgs.gnupg
nixpkgs.pinentry-curses
nixpkgs.pinentry-qt
nixpkgs.paperkey
nixpkgs.wget
];
programs = {
ssh.startAgent = false;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
}
];
};
images.rpi = nixosConfigurations.rpi.config.system.build.sdImage;
};
}
I’m still very new to Nix and I’ve been trying to put together a flake for building raw images to flash NixOS to my RPi. In the above example, I’m getting a bunch of attribute '....' missing
errors in the references to nixpkgs
. The errors start in the attribute set in the modules
array. It seems like it’s somehow getting mutated, but again I’m too much of a beginner to really comprehend what’s going on here. Any help would be appreciated.