diff --git a/modules/hosts/john-pc/default.nix b/modules/hosts/john-pc/default.nix index 7fa99f1..4537f67 100644 --- a/modules/hosts/john-pc/default.nix +++ b/modules/hosts/john-pc/default.nix @@ -5,6 +5,7 @@ let testHost = "soteria"; # which host to test build testTarget = "fded:fb16:653e:25da:be24:11ff:fea0:753f"; # test-nix + resolvedTarget = "test-nix"; # testTarget = "fded:fb16:653e:25da:be24:11ff:fe89:1cc3"; # soteria in @@ -15,12 +16,12 @@ in resticPasswordFile = "${config.xdg.configHome}/restic/password.txt"; testPushCmd = (pkgs.writeShellScriptBin "test-push" '' - ${lib.getExe' pkgs.coreutils "echo"} "Pushing ${testHost} to ${testTarget}" - ${lib.getExe' pkgs.coreutils "mkdir"} -p /var/tmp/nix-build - ${lib.getExe' pkgs.coreutils "chmod"} 1777 /var/tmp/nix-build - ${lib.getExe pkgs.nixos-rebuild} switch \ - --flake ${flakeDir}#${testHost} \ - --target-host root@${testTarget} + ${lib.getExe' pkgs.coreutils "echo"} "Pushing ${testHost} to ${resolvedTarget}" + ${lib.getExe pkgs.nh} os switch ${flakeDir}#${testHost} \ + -e passwordless \ + --target-host ${resolvedTarget} \ + --diff always \ + "$@" ''); in { @@ -34,7 +35,6 @@ in restic docker desktop - # neovim ]; # TODO: make this more restrictive, rather than allowing all unfree packages nixpkgs.config.allowUnfree = true;