2021-01-16 13:17:21 +01:00
|
|
|
{ substituteAll
|
|
|
|
, runtimeShell
|
|
|
|
, coreutils
|
|
|
|
, gnused
|
|
|
|
, gnugrep
|
|
|
|
, nix
|
|
|
|
, lib
|
2022-03-08 18:01:40 +01:00
|
|
|
, nixosTests
|
2021-01-16 13:17:21 +01:00
|
|
|
}:
|
2021-01-15 20:03:07 +01:00
|
|
|
let
|
|
|
|
fallback = import ./../../../../nixos/modules/installer/tools/nix-fallback-paths.nix;
|
2021-01-16 13:17:21 +01:00
|
|
|
in
|
|
|
|
substituteAll {
|
2021-01-15 20:03:07 +01:00
|
|
|
name = "nixos-rebuild";
|
|
|
|
src = ./nixos-rebuild.sh;
|
|
|
|
dir = "bin";
|
|
|
|
isExecutable = true;
|
|
|
|
inherit runtimeShell nix;
|
|
|
|
nix_x86_64_linux = fallback.x86_64-linux;
|
|
|
|
nix_i686_linux = fallback.i686-linux;
|
2021-05-14 14:53:57 +02:00
|
|
|
nix_aarch64_linux = fallback.aarch64-linux;
|
2022-01-05 00:02:47 +01:00
|
|
|
path = lib.makeBinPath [ coreutils gnused gnugrep ];
|
2022-03-08 18:01:40 +01:00
|
|
|
|
|
|
|
# run some a simple installer tests to make sure nixos-rebuild still works for them
|
|
|
|
passthru.tests = {
|
|
|
|
simple-installer-test = nixosTests.installer.simple;
|
|
|
|
};
|
2022-03-22 18:35:33 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Rebuild your NixOS configuration and switch to it, on local hosts and remote.";
|
|
|
|
homepage = "https://github.com/NixOS/nixpkgs/tree/master/pkgs/os-specific/linux/nixos-rebuild";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.Profpatsch ];
|
|
|
|
mainProgram = "nixos-rebuild";
|
|
|
|
};
|
2021-01-15 20:03:07 +01:00
|
|
|
}
|