chore(ops/nixos): drop ops.rebuild-system
This doesn't really work in all cases anyways, and currently isn't used to deploy - remove it. Change-Id: I6684d9583cb036d851ab6cd9f4c811973a7882fc Reviewed-on: https://cl.snix.dev/c/snix/+/30242 Autosubmit: Florian Klink <flokli@flokli.de> Tested-by: besadii Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
This commit is contained in:
parent
2bedbfdb18
commit
8e1fa6435c
2 changed files with 0 additions and 20 deletions
|
|
@ -38,25 +38,6 @@ in rec {
|
|||
(throw "${hostname} is not a known NixOS host")
|
||||
(map nixosFor depot.ops.machines.all-systems));
|
||||
|
||||
rebuild-system = rebuildSystemWith (
|
||||
# HACK: use the string of the original source to avoid copying the whole
|
||||
# depot into the store just for this
|
||||
builtins.toString depot.path.origSrc);
|
||||
|
||||
rebuildSystemWith = depotPath: pkgs.writeShellScriptBin "rebuild-system" ''
|
||||
set -ue
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "Oh no! Only root is allowed to rebuild the system!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Rebuilding NixOS for $HOSTNAME"
|
||||
system=$(${pkgs.nix}/bin/nix-build -E "((import ${depotPath} {}).ops.nixos.findSystem \"$HOSTNAME\").system" --no-out-link --show-trace)
|
||||
|
||||
${pkgs.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set $system
|
||||
$system/bin/switch-to-configuration switch
|
||||
'';
|
||||
|
||||
# Systems that should be built in CI
|
||||
archivistEC2System = nixosFor depot.ops.machines.archivist-ec2;
|
||||
gerrit01System = nixosFor depot.ops.machines.gerrit01;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue