update systems by ip in update script

This commit is contained in:
goeranh 2026-02-28 14:44:13 +01:00
parent fc39a4c73f
commit dbc53eee65
No known key found for this signature in database

View file

@ -46,7 +46,7 @@
# run nixos-rebuild switch on the target system
# the config will be built locally and copied over
"${name}-update" = nixpkgs.legacyPackages.x86_64-linux.writeShellScriptBin "update" ''
nixos-rebuild switch --flake .#${name} --target-host root@${name}.test.htw.stura-dresden.de
nixos-rebuild switch --flake .#${name} --target-host root@${(builtins.head (nixosConfigurations.${name}.config.networking.interfaces.${builtins.head (builtins.attrNames nixosConfigurations.${name}.config.networking.interfaces)}.ipv4.addresses)).address}
'';
# copy install image to testserver and deploy the specified configuration to it