2022-08-25 18:45:47 +03:00
|
|
|
{
|
2022-12-06 20:40:55 +03:00
|
|
|
description = "A flake for building NixOS installers that work on T2 Macs";
|
2022-08-25 18:45:47 +03:00
|
|
|
|
|
|
|
|
inputs = {
|
2022-09-16 21:17:49 +03:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2023-07-10 22:14:24 +02:00
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
2022-08-25 18:45:47 +03:00
|
|
|
};
|
|
|
|
|
|
2024-12-09 17:04:13 +08:00
|
|
|
nixConfig = {
|
|
|
|
|
extra-trusted-substituters = [ "https://cache.soopy.moe" ];
|
|
|
|
|
extra-substituters = [ "https://cache.soopy.moe" ];
|
|
|
|
|
extra-trusted-public-keys = [ "cache.soopy.moe-1:0RZVsQeR+GOh0VQI9rvnHz55nVXkFardDqfm4+afjPo=" ];
|
|
|
|
|
};
|
|
|
|
|
|
2022-08-25 18:45:47 +03:00
|
|
|
outputs = { self, nixpkgs, nixos-hardware }:
|
|
|
|
|
let
|
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
|
|
|
|
|
|
mergeMap = fn: list: lib.lists.foldr (a: b: a // b) {} (map fn list);
|
|
|
|
|
in
|
|
|
|
|
mergeMap (config: {
|
|
|
|
|
${lib.strings.removeSuffix ".nix" (builtins.baseNameOf config)} = (lib.nixosSystem {
|
|
|
|
|
inherit system;
|
|
|
|
|
|
|
|
|
|
modules = [ config ];
|
|
|
|
|
|
|
|
|
|
specialArgs = {
|
|
|
|
|
inherit nixos-hardware;
|
|
|
|
|
};
|
|
|
|
|
}).config.system.build.isoImage;
|
2022-10-02 17:56:05 +03:00
|
|
|
}) (builtins.filter (x: x != null) (lib.attrsets.mapAttrsToList (key: value: if value == "regular" && lib.strings.hasInfix "iso" key then ./nix/${key} else null) (builtins.readDir ./nix)));
|
2022-08-25 18:45:47 +03:00
|
|
|
}
|