Merge pull request #136 from nix-community/nixpkgs-upstream
kexec-installer: disable channel in unstable
This commit is contained in:
commit
233cb26594
2 changed files with 65 additions and 52 deletions
12
flake.lock
12
flake.lock
|
@ -18,16 +18,16 @@
|
||||||
},
|
},
|
||||||
"nixos-unstable": {
|
"nixos-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698800439,
|
"lastModified": 1698919212,
|
||||||
"narHash": "sha256-SrAwRi266j7U9XqCl0qPwsvcFiQ55iPXEK36ZX6QPjE=",
|
"narHash": "sha256-Sd1h8Dj687VgSj+h4qP8hDcTAzzxJy/MWm+gulO14jA=",
|
||||||
"owner": "NixOS",
|
"owner": "Mic92",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0ac7840a74c53b62f124e86fcde8cdd45f2bc131",
|
"rev": "c7614b205e20752323019d07c65b87d571486ced",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "Mic92",
|
||||||
"ref": "nixos-unstable-small",
|
"ref": "smaller-installer",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
105
flake.nix
105
flake.nix
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
description = "NixOS images";
|
description = "NixOS images";
|
||||||
|
|
||||||
inputs.nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
#inputs.nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
||||||
|
inputs.nixos-unstable.url = "github:Mic92/nixpkgs/smaller-installer"; # https://github.com/NixOS/nixpkgs/pull/263974
|
||||||
inputs.nixos-2305.url = "github:NixOS/nixpkgs/release-23.05";
|
inputs.nixos-2305.url = "github:NixOS/nixpkgs/release-23.05";
|
||||||
|
|
||||||
nixConfig.extra-substituters = [
|
nixConfig.extra-substituters = [
|
||||||
|
@ -11,53 +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 [];
|
{
|
||||||
|
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 [
|
kexec-installer-nixos-unstable-noninteractive = kexec-installer nixos-unstable [
|
||||||
{ system.kexec-installer.name = "nixos-kexec-installer-noninteractive"; }
|
{
|
||||||
self.nixosModules.noninteractive
|
system.kexec-installer.name = "nixos-kexec-installer-noninteractive";
|
||||||
];
|
system.installer.channel.enable = false; # TODO: enable this also in the 23.11 edition, once we have it.
|
||||||
kexec-installer-nixos-2305-noninteractive = kexec-installer nixos-2305 [
|
}
|
||||||
{ system.kexec-installer.name = "nixos-kexec-installer-noninteractive"; }
|
self.nixosModules.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-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.
|
||||||
});
|
];
|
||||||
nixosModules = {
|
netboot-installer-nixos-2305 = netboot-installer nixos-2305 [ ];
|
||||||
kexec-installer = ./nix/kexec-installer/module.nix;
|
});
|
||||||
noninteractive = ./nix/noninteractive.nix;
|
nixosModules = {
|
||||||
# TODO: also add a test here once we have https://github.com/NixOS/nixpkgs/pull/228346 merged
|
kexec-installer = ./nix/kexec-installer/module.nix;
|
||||||
netboot-installer = ./nix/netboot-installer/module.nix;
|
noninteractive = ./nix/noninteractive.nix;
|
||||||
};
|
# TODO: also add a test here once we have https://github.com/NixOS/nixpkgs/pull/228346 merged
|
||||||
checks.x86_64-linux = let
|
netboot-installer = ./nix/netboot-installer/module.nix;
|
||||||
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;
|
|
||||||
};
|
};
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue