nix/sd-image.nix

15 lines
494 B
Nix
Raw Normal View History

2023-09-16 12:08:02 +09:00
# Raspberry Pi SD Image
# $ nix-build '<nixpkgs/nixos>' -A config.system.build.sdImage -I nixos-config=./sd-image.nix
# https://nixos.wiki/wiki/NixOS_on_ARM#Installation
2023-09-16 12:09:03 +09:00
{ config, ... }: {
2023-09-16 12:08:02 +09:00
nixpkgs.crossSystem.system = "armv7l-linux";
2023-09-16 12:09:03 +09:00
2023-09-16 12:08:02 +09:00
# Simple bootstrap SD image for the Raspberry Pi
imports = [
<nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64.nix>
./nixos/users/albert
];
# Temporarily allow ssh access for imaging
networking.firewall.allowedTCPPorts = [ 22 ];
}