2022-12-14 17:32:53 +01:00
|
|
|
{
|
|
|
|
description = "NixOS images";
|
|
|
|
|
2022-12-16 13:44:26 +01:00
|
|
|
inputs.nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
2023-01-11 10:53:40 +01:00
|
|
|
inputs.nixos-2211.url = "github:NixOS/nixpkgs/release-22.11";
|
2022-12-16 13:44:26 +01:00
|
|
|
|
|
|
|
nixConfig.extra-substituters = [
|
|
|
|
"https://cache.garnix.io"
|
|
|
|
];
|
|
|
|
nixConfig.extra-trusted-public-keys = [
|
|
|
|
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
|
|
|
];
|
|
|
|
|
2022-12-30 11:08:00 +01:00
|
|
|
outputs = { self, nixos-unstable, nixos-2211 }: let
|
|
|
|
supportedSystems = [ "aarch64-linux" "x86_64-linux" ];
|
|
|
|
forAllSystems = nixos-unstable.lib.genAttrs supportedSystems;
|
|
|
|
in {
|
|
|
|
packages = forAllSystems (system: let
|
|
|
|
netboot = nixpkgs: (import (nixpkgs + "/nixos/release.nix") {}).netboot.${system};
|
2023-04-13 22:08:30 +02:00
|
|
|
kexec-installer = nixpkgs: modules: (nixpkgs.legacyPackages.${system}.nixos (modules ++ [self.nixosModules.kexec-installer])).config.system.build.kexecTarball;
|
2022-12-16 13:44:26 +01:00
|
|
|
in {
|
2022-12-16 15:27:57 +01:00
|
|
|
netboot-nixos-unstable = netboot nixos-unstable;
|
2022-12-19 13:58:52 +01:00
|
|
|
netboot-nixos-2211 = netboot nixos-2211;
|
2023-04-13 22:08:30 +02:00
|
|
|
kexec-installer-nixos-unstable = kexec-installer nixos-unstable [];
|
|
|
|
kexec-installer-nixos-2211 = kexec-installer nixos-2211 [];
|
|
|
|
|
2023-05-07 21:06:12 +02:00
|
|
|
kexec-installer-nixos-unstable-noninteractive = kexec-installer nixos-unstable [
|
2023-05-07 21:10:51 +02:00
|
|
|
{ system.kexec-installer.name = "nixos-kexec-installer-noninteractive"; }
|
2023-05-07 21:06:12 +02:00
|
|
|
self.nixosModules.noninteractive
|
|
|
|
];
|
|
|
|
kexec-installer-nixos-2211-noninteractive = kexec-installer nixos-2211 [
|
2023-05-07 21:10:51 +02:00
|
|
|
{ system.kexec-installer.name = "nixos-kexec-installer-noninteractive"; }
|
2023-05-07 21:06:12 +02:00
|
|
|
self.nixosModules.noninteractive
|
|
|
|
];
|
2022-12-30 11:08:00 +01:00
|
|
|
});
|
2023-04-13 22:08:30 +02:00
|
|
|
nixosModules = {
|
|
|
|
kexec-installer = ./nix/kexec-installer/module.nix;
|
|
|
|
noninteractive = ./nix/noninteractive.nix;
|
|
|
|
};
|
2023-01-24 15:05:33 +01:00
|
|
|
checks.x86_64-linux = let
|
|
|
|
pkgs = nixos-unstable.legacyPackages.x86_64-linux;
|
|
|
|
in {
|
|
|
|
kexec-installer-unstable = pkgs.callPackage ./nix/kexec-installer/test.nix {};
|
|
|
|
shellcheck = pkgs.runCommand "shellcheck" {
|
|
|
|
nativeBuildInputs = [ pkgs.shellcheck ];
|
|
|
|
} ''
|
|
|
|
shellcheck ${(pkgs.nixos [self.nixosModules.kexec-installer]).config.system.build.kexecRun}
|
|
|
|
touch $out
|
|
|
|
'';
|
2023-01-11 10:53:40 +01:00
|
|
|
kexec-installer-2211 = nixos-2211.legacyPackages.x86_64-linux.callPackage ./nix/kexec-installer/test.nix {};
|
2022-12-16 13:44:26 +01:00
|
|
|
};
|
2022-12-14 17:32:53 +01:00
|
|
|
};
|
|
|
|
}
|