g5bsd/flake.nix

33 lines
898 B
Nix
Raw Normal View History

2024-08-05 17:05:17 +01:00
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixos-hardware.url = "github:nixos/nixos-hardware";
};
outputs = { self, nixpkgs, nixos-hardware }: rec {
images = {
pi = (self.nixosConfigurations.pi.extendModules {
modules = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
{
disabledModules = [ "profiles/base.nix" ];
}
];
}).config.system.build.sdImage;
};
packages.x86_64-linux.pi-image = images.pi;
packages.aarch64-linux.pi-image = images.pi;
nixosConfigurations = {
pi = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
nixos-hardware.nixosModules.raspberry-pi-3
"${nixpkgs}/nixos/modules/profiles/minimal.nix"
./configuration.nix
./base.nix
];
};
};
};
}