qclk/firmware/default.nix

33 lines
670 B
Nix

{ inputs, ... }:
let
mkSystem = target: inputs.nixpkgs.lib.nixosSystem {
modules = [
./base.nix
target
];
};
in
{
flake.nixosConfigurations = {
qclk-rpi3 = mkSystem target/rpi3.nix;
};
perSystem = { libMy, pkgs, ... }: {
devenv.shells.firmware = libMy.withRootdir {
packages = with pkgs; [
nixos-rebuild
nixVersions.latest
];
scripts = {
build.exec = ''
nix build "..#nixosConfigurations.qclk-$1.config.system.build.toplevel"
'';
build-image.exec = ''
nix build "..#nixosConfigurations.qclk-$1.config.my.build.image"
'';
};
};
};
}