From dbc53eee65346c69a8c250e8abe6030f32a39be5 Mon Sep 17 00:00:00 2001 From: goeranh Date: Sat, 28 Feb 2026 14:44:13 +0100 Subject: [PATCH] update systems by ip in update script --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 61f95b8..73f011a 100644 --- a/flake.nix +++ b/flake.nix @@ -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