diff --git a/Makefile b/Makefile index 6d08c7c1..32bb5e9c 100644 --- a/Makefile +++ b/Makefile @@ -54,16 +54,28 @@ darwin-debug: darwin-set-proxy add-idols-ssh-key: ssh-add ~/.ssh/ai-idols -idols: add-idols-ssh-key +aqua: add-idols-ssh-key nixos-rebuild --flake .#aquamarine --target-host aquamarine --build-host aquamarine switch --use-remote-sudo + +aqua-debug: add-idols-ssh-key + nixos-rebuild --flake .#aquamarine --target-host aquamarine --build-host aquamarine switch --use-remote-sudo --show-trace --verbose + +ruby: add-idols-ssh-key nixos-rebuild --flake .#ruby --target-host ruby --build-host ruby switch --use-remote-sudo + +ruby-debug: add-idols-ssh-key + nixos-rebuild --flake .#ruby --target-host ruby --build-host ruby switch --use-remote-sudo --show-trace --verbose + +kana: add-idols-ssh-key nixos-rebuild --flake .#kana --target-host kana --build-host kana switch --use-remote-sudo -idols-debug: add-idols-ssh-key - nixos-rebuild --flake .#aquamarine --target-host aquamarine --build-host aquamarine switch --use-remote-sudo --show-trace --verbose - nixos-rebuild --flake .#ruby --target-host ruby --build-host ruby switch --use-remote-sudo --show-trace --verbose +kana-debug: add-idols-ssh-key nixos-rebuild --flake .#kana --target-host kana --build-host kana switch --use-remote-sudo --show-trace --verbose +idols: aqua ruby kana + +idols-debug: aqua-debug ruby-debug kana-debug + # only used once to setup the virtual machines idols-image: # take image for idols, and upload the image to proxmox nodes. diff --git a/README.md b/README.md index 115779a8..7e5cfd14 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,9 @@ ssh-add ~/.ssh/ai-idols # 2. deploy the configuration to the remote host, using the ssh key we added in step 1 # and the username defaults to `$USER`, it's `ryan` in my case. nixos-rebuild --flake .#aquamarine --target-host aquamarine --build-host aquamarine switch --use-remote-sudo --verbose + +# or we can replace the command above with the following command, which is defined in Makefile +make aqua ``` The commands above will build & deploy the configuration to `aquamarine`, the build process will be executed on `aquamarine` too, and the `--use-remote-sudo` option indicates that we will use `sudo` on the remote host, because `nixos-rebuild switch` needs root permission to deploy the configuration.