nixos-images/flake.nix
Jörg Thalheim c92fa3d2f7 ping to nixpkgs fork to incorperate aarch64 fix
flake.lock: Update

Flake lock file updates:

• Updated input 'nixos-2305':
    'github:NixOS/nixpkgs/75eb7c2d47fdc01a0d477e9a89eac7ed366fe898' (2023-06-14)
  → 'github:Mic92/nixpkgs/60e994e7ada7ce39b775d92cbb70a611c59f45d1' (2023-06-15)
• Updated input 'nixos-unstable':
    'github:NixOS/nixpkgs/ba1a6ec548000d4a50719d14e6f73f63016674d5' (2023-06-14)
  → 'github:Mic92/nixpkgs/d21b935395b8880dd4e80dfac4104553cb795d03' (2023-06-15)
2023-06-15 10:02:07 +02:00

67 lines
3.1 KiB
Nix

{
description = "NixOS images";
# see https://github.com/NixOS/nixpkgs/pull/237873
#inputs.nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
inputs.nixos-unstable.url = "github:Mic92/nixpkgs/fix-aarch64-zfs";
# see https://github.com/NixOS/nixpkgs/pull/237875
#inputs.nixos-2305.url = "github:NixOS/nixpkgs/release-23.05";
inputs.nixos-2305.url = "github:Mic92/nixpkgs/fix-aarch64-zfs-backport";
nixConfig.extra-substituters = [
"https://cache.garnix.io"
];
nixConfig.extra-trusted-public-keys = [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
];
outputs = { self, nixos-unstable, nixos-2305 }: 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};
kexec-installer = nixpkgs: modules: (nixpkgs.legacyPackages.${system}.nixos (modules ++ [self.nixosModules.kexec-installer])).config.system.build.kexecTarball;
netboot-installer = nixpkgs: (nixpkgs.legacyPackages.${system}.nixos [self.nixosModules.netboot-installer]).config.system.build.netboot;
in {
netboot-nixos-unstable = netboot nixos-unstable;
netboot-nixos-2305 = netboot nixos-2305;
kexec-installer-nixos-unstable = kexec-installer nixos-unstable [];
kexec-installer-nixos-2305 = kexec-installer nixos-2305 [];
kexec-installer-nixos-unstable-noninteractive = kexec-installer nixos-unstable [
{ system.kexec-installer.name = "nixos-kexec-installer-noninteractive"; }
self.nixosModules.noninteractive
];
kexec-installer-nixos-2305-noninteractive = kexec-installer nixos-2305 [
{ system.kexec-installer.name = "nixos-kexec-installer-noninteractive"; }
self.nixosModules.noninteractive
];
netboot-installer-nixos-unstable = netboot-installer nixos-unstable;
netboot-installer-nixos-2305 = netboot-installer nixos-2305;
});
nixosModules = {
kexec-installer = ./nix/kexec-installer/module.nix;
noninteractive = ./nix/noninteractive.nix;
# TODO: also add a test here once we have https://github.com/NixOS/nixpkgs/pull/228346 merged
netboot-installer = ./nix/netboot-installer/module.nix;
};
checks.x86_64-linux = let
pkgs = nixos-unstable.legacyPackages.x86_64-linux;
in {
kexec-installer-unstable = pkgs.callPackage ./nix/kexec-installer/test.nix {
kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-unstable-noninteractive;
};
shellcheck = pkgs.runCommand "shellcheck" {
nativeBuildInputs = [ pkgs.shellcheck ];
} ''
shellcheck ${(pkgs.nixos [self.nixosModules.kexec-installer]).config.system.build.kexecRun}
touch $out
'';
kexec-installer-2305 = nixos-2305.legacyPackages.x86_64-linux.callPackage ./nix/kexec-installer/test.nix {
kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-2305-noninteractive;
};
};
};
}