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

View file

@ -12,19 +12,23 @@
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
]; ];
outputs = { self, nixos-unstable, nixos-2305 }: let outputs = { self, nixos-unstable, nixos-2305 }:
let
supportedSystems = [ "aarch64-linux" "x86_64-linux" ]; supportedSystems = [ "aarch64-linux" "x86_64-linux" ];
forAllSystems = nixos-unstable.lib.genAttrs supportedSystems; forAllSystems = nixos-unstable.lib.genAttrs supportedSystems;
in { in
packages = forAllSystems (system: let {
netboot = nixpkgs: (import (nixpkgs + "/nixos/release.nix") {}).netboot.${system}; packages = forAllSystems (system:
kexec-installer = nixpkgs: modules: (nixpkgs.legacyPackages.${system}.nixos (modules ++ [self.nixosModules.kexec-installer])).config.system.build.kexecTarball; let
netboot-installer = nixpkgs: (nixpkgs.legacyPackages.${system}.nixos [self.nixosModules.netboot-installer]).config.system.build.netboot; netboot = nixpkgs: (import (nixpkgs + "/nixos/release.nix") { }).netboot.${system};
in { kexec-installer = nixpkgs: modules: (nixpkgs.legacyPackages.${system}.nixos (modules ++ [ self.nixosModules.kexec-installer ])).config.system.build.kexecTarball;
netboot-installer = nixpkgs: modules: (nixpkgs.legacyPackages.${system}.nixos (modules ++ [ self.nixosModules.netboot-installer ])).config.system.build.netboot;
in
{
netboot-nixos-unstable = netboot nixos-unstable; netboot-nixos-unstable = netboot nixos-unstable;
netboot-nixos-2305 = netboot nixos-2305; netboot-nixos-2305 = netboot nixos-2305;
kexec-installer-nixos-unstable = kexec-installer nixos-unstable []; kexec-installer-nixos-unstable = kexec-installer nixos-unstable [ ];
kexec-installer-nixos-2305 = kexec-installer nixos-2305 []; kexec-installer-nixos-2305 = kexec-installer nixos-2305 [ ];
kexec-installer-nixos-unstable-noninteractive = kexec-installer nixos-unstable [ kexec-installer-nixos-unstable-noninteractive = kexec-installer nixos-unstable [
{ {
@ -38,8 +42,10 @@
self.nixosModules.noninteractive self.nixosModules.noninteractive
]; ];
netboot-installer-nixos-unstable = netboot-installer nixos-unstable; netboot-installer-nixos-unstable = netboot-installer nixos-unstable [
netboot-installer-nixos-2305 = netboot-installer nixos-2305; { system.installer.channel.enable = false; } # TODO: enable this also in the 23.11 edition, once we have it.
];
netboot-installer-nixos-2305 = netboot-installer nixos-2305 [ ];
}); });
nixosModules = { nixosModules = {
kexec-installer = ./nix/kexec-installer/module.nix; kexec-installer = ./nix/kexec-installer/module.nix;
@ -47,13 +53,16 @@
# TODO: also add a test here once we have https://github.com/NixOS/nixpkgs/pull/228346 merged # TODO: also add a test here once we have https://github.com/NixOS/nixpkgs/pull/228346 merged
netboot-installer = ./nix/netboot-installer/module.nix; netboot-installer = ./nix/netboot-installer/module.nix;
}; };
checks.x86_64-linux = let checks.x86_64-linux =
let
pkgs = nixos-unstable.legacyPackages.x86_64-linux; pkgs = nixos-unstable.legacyPackages.x86_64-linux;
in { in
{
kexec-installer-unstable = pkgs.callPackage ./nix/kexec-installer/test.nix { kexec-installer-unstable = pkgs.callPackage ./nix/kexec-installer/test.nix {
kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-unstable-noninteractive; kexecTarball = self.packages.x86_64-linux.kexec-installer-nixos-unstable-noninteractive;
}; };
shellcheck = pkgs.runCommand "shellcheck" { shellcheck = pkgs.runCommand "shellcheck"
{
nativeBuildInputs = [ pkgs.shellcheck ]; nativeBuildInputs = [ pkgs.shellcheck ];
} '' } ''
shellcheck ${(pkgs.nixos [self.nixosModules.kexec-installer]).config.system.build.kexecRun} shellcheck ${(pkgs.nixos [self.nixosModules.kexec-installer]).config.system.build.kexecRun}