diff --git a/installer/nixos-install.nix b/installer/nixos-install.nix index 8e3eff4d947a..298bf594c446 100644 --- a/installer/nixos-install.nix +++ b/installer/nixos-install.nix @@ -1,4 +1,4 @@ -{ stdenv, perl, runCommand, substituteAll, nix +{ perl, runCommand, substituteAll, nix , # URL of the Nixpkgs distribution that the installer will pull. # Leave empty for a pure source distribution. nixpkgsURL ? "" diff --git a/installer/nixos-rebuild.nix b/installer/nixos-rebuild.nix new file mode 100644 index 000000000000..52cc939eabfd --- /dev/null +++ b/installer/nixos-rebuild.nix @@ -0,0 +1,9 @@ +{substituteAll, nix}: + +substituteAll { + name = "nixos-rebuild"; + src = ./nixos-rebuild.sh; + dir = "bin"; + isExecutable = true; + inherit nix; +} diff --git a/installer/nixos-rebuild.sh b/installer/nixos-rebuild.sh new file mode 100644 index 000000000000..12404f8d4af2 --- /dev/null +++ b/installer/nixos-rebuild.sh @@ -0,0 +1,49 @@ +#! @shell@ -e + + +# What are we supposed to do? +action="$1" + +if test -z "$action"; then + # !!! more or less cut&paste from + # system/switch-to-configuration.sh (which we call, of course). + cat <