From bb0cd7a49625eeba1fbd8938463cd315f328eeae Mon Sep 17 00:00:00 2001 From: sstent Date: Sat, 16 Aug 2025 01:54:30 +0000 Subject: [PATCH] sync --- dotfiles/sstent/justfile | 19 ++++++++++++++++++- home-manager/users/sstent/default.nix | 20 ++++++++++---------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/dotfiles/sstent/justfile b/dotfiles/sstent/justfile index 84b0d49..e26c02b 100644 --- a/dotfiles/sstent/justfile +++ b/dotfiles/sstent/justfile @@ -54,9 +54,26 @@ nomad_exec_bash SERVICE: nomad_exec_sh SERVICE: ID=$(nomad status {{SERVICE}} | grep "running" | grep "{{SERVICE}}" | head -n 1| awk '{print $1}'); nomad alloc exec -task {{SERVICE}} -t ${ID} /bin/sh - +nomad_log SERVICE TASK: + ID=$(nomad status {{SERVICE}} | grep "running" | grep "{{SERVICE}}" | head -n 1| awk '{print $1}'); nomad alloc logs -task {{TASK}} ${ID} run_nicotine: mullvad connect -nix-shell -p nicotine-plus --command nicotine-plus mullvad disconnect + +# Define your hosts here +HOSTS := "odroid6 odroid7 odroid8 opti1" + +# Run a command on all predefined hosts +ssh_all COMMAND: + @for host in {{HOSTS}}; do echo "=== Running on $host ==="; ssh "$host" '{{COMMAND}}'; echo ""; done + +# Run a command on a specific host +ssh_host HOST COMMAND: + @ssh "{{HOST}}" '{{COMMAND}}' + +# Show the list of predefined hosts +ssh_list_hosts: + @echo "Predefined hosts:" + @echo "{{HOSTS}}" | tr ' ' '\n' | sed 's/^/ - /' diff --git a/home-manager/users/sstent/default.nix b/home-manager/users/sstent/default.nix index dfacda6..f016546 100644 --- a/home-manager/users/sstent/default.nix +++ b/home-manager/users/sstent/default.nix @@ -141,7 +141,7 @@ user = "git"; identityFile = "~/.ssh/id_rsa_git"; }; - "192.168.1.*" = { + "192.168.4.*" = { user = "root"; extraOptions = { StrictHostKeyChecking = "no"; @@ -158,15 +158,6 @@ PubkeyAcceptedKeyTypes = "+ssh-rsa"; ##needed to allow the USG to login with ssh key }; }; - ##USG - "192.168.1.1" = { - user = "fbleagh"; - extraOptions = { - StrictHostKeyChecking = "no"; - UpdateHostKeys = "yes"; - PubkeyAcceptedKeyTypes = "+ssh-rsa"; ##needed to allow the USG to login with ssh key - }; - }; "router" = { user = "fbleagh"; extraOptions = { @@ -183,6 +174,15 @@ UserKnownHostsFile = "/dev/null"; }; }; + "opti*" = { + user = "root"; + extraOptions = { + StrictHostKeyChecking = "no"; + UpdateHostKeys = "yes"; + UserKnownHostsFile = "/dev/null"; + }; + }; + }; }; };