netboot-installer: disable channel in unstable

This commit is contained in:
Jörg Thalheim 2023-11-02 11:09:47 +01:00
parent 6b3ebfbf99
commit 913fba8fbe

105
flake.nix
View file

@ -12,56 +12,65 @@
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
]; ];
outputs = { self, nixos-unstable, nixos-2305 }: let outputs = { self, nixos-unstable, nixos-2305 }:
supportedSystems = [ "aarch64-linux" "x86_64-linux" ]; let
forAllSystems = nixos-unstable.lib.genAttrs supportedSystems; supportedSystems = [ "aarch64-linux" "x86_64-linux" ];
in { forAllSystems = nixos-unstable.lib.genAttrs supportedSystems;
packages = forAllSystems (system: let in
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; packages = forAllSystems (system:
netboot-installer = nixpkgs: (nixpkgs.legacyPackages.${system}.nixos [self.nixosModules.netboot-installer]).config.system.build.netboot; let
in { netboot = nixpkgs: (import (nixpkgs + "/nixos/release.nix") { }).netboot.${system};
netboot-nixos-unstable = netboot nixos-unstable; kexec-installer = nixpkgs: modules: (nixpkgs.legacyPackages.${system}.nixos (modules ++ [ self.nixosModules.kexec-installer ])).config.system.build.kexecTarball;
netboot-nixos-2305 = netboot nixos-2305; netboot-installer = nixpkgs: modules: (nixpkgs.legacyPackages.${system}.nixos (modules ++ [ self.nixosModules.netboot-installer ])).config.system.build.netboot;
kexec-installer-nixos-unstable = kexec-installer nixos-unstable []; in
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"; netboot-nixos-unstable = netboot nixos-unstable;
system.installer.channel.enable = false; # TODO: enable this also in the 23.11 edition, once we have it. netboot-nixos-2305 = netboot nixos-2305;
} kexec-installer-nixos-unstable = kexec-installer nixos-unstable [ ];
self.nixosModules.noninteractive kexec-installer-nixos-2305 = kexec-installer nixos-2305 [ ];
];
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; kexec-installer-nixos-unstable-noninteractive = kexec-installer nixos-unstable [
netboot-installer-nixos-2305 = netboot-installer nixos-2305; {
}); system.kexec-installer.name = "nixos-kexec-installer-noninteractive";
nixosModules = { system.installer.channel.enable = false; # TODO: enable this also in the 23.11 edition, once we have it.
kexec-installer = ./nix/kexec-installer/module.nix; }
noninteractive = ./nix/noninteractive.nix; self.nixosModules.noninteractive
# TODO: also add a test here once we have https://github.com/NixOS/nixpkgs/pull/228346 merged ];
netboot-installer = ./nix/netboot-installer/module.nix; kexec-installer-nixos-2305-noninteractive = kexec-installer nixos-2305 [
}; { system.kexec-installer.name = "nixos-kexec-installer-noninteractive"; }
checks.x86_64-linux = let self.nixosModules.noninteractive
pkgs = nixos-unstable.legacyPackages.x86_64-linux; ];
in {
kexec-installer-unstable = pkgs.callPackage ./nix/kexec-installer/test.nix { netboot-installer-nixos-unstable = netboot-installer nixos-unstable [
kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-unstable-noninteractive; { system.installer.channel.enable = false; } # TODO: enable this also in the 23.11 edition, once we have it.
}; ];
shellcheck = pkgs.runCommand "shellcheck" { netboot-installer-nixos-2305 = netboot-installer nixos-2305 [ ];
nativeBuildInputs = [ pkgs.shellcheck ]; });
} '' nixosModules = {
shellcheck ${(pkgs.nixos [self.nixosModules.kexec-installer]).config.system.build.kexecRun} kexec-installer = ./nix/kexec-installer/module.nix;
touch $out noninteractive = ./nix/noninteractive.nix;
''; # TODO: also add a test here once we have https://github.com/NixOS/nixpkgs/pull/228346 merged
kexec-installer-2305 = nixos-2305.legacyPackages.x86_64-linux.callPackage ./nix/kexec-installer/test.nix { netboot-installer = ./nix/netboot-installer/module.nix;
kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-2305-noninteractive;
}; };
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;
};
};
}; };
};
} }