From e274ae7ae1d5261227aca38ca01c0624b80d2250 Mon Sep 17 00:00:00 2001 From: Menno van Leeuwen Date: Thu, 31 Jul 2025 13:42:13 +0200 Subject: [PATCH] Update smart-ssh config and improve logging output --- .../tasks/global/utils/smart-ssh/config.yaml | 15 ++++++++++----- .../tasks/global/utils/smart-ssh/smart-ssh.go | 5 ++++- .../autostart/io.github.mrvladus.List.desktop | 0 config/home-manager/flake.lock | 18 +++++++++--------- 4 files changed, 23 insertions(+), 15 deletions(-) mode change 100644 => 100755 config/autostart/io.github.mrvladus.List.desktop diff --git a/config/ansible/tasks/global/utils/smart-ssh/config.yaml b/config/ansible/tasks/global/utils/smart-ssh/config.yaml index f664684..e06f308 100644 --- a/config/ansible/tasks/global/utils/smart-ssh/config.yaml +++ b/config/ansible/tasks/global/utils/smart-ssh/config.yaml @@ -10,12 +10,17 @@ logging: format: "console" smart_aliases: - # Desktop connection - tries local network first, falls back to Tailscale desktop: - primary: "desktop-local" # Use this SSH config entry when local network is available - fallback: "desktop" # Use this SSH config entry when local network is not available - check_host: "192.168.86.22" # IP address to ping for connectivity test - timeout: "2s" # Timeout for connectivity check + primary: "desktop-local" + fallback: "desktop" + check_host: "192.168.1.254" + timeout: "2s" + + laptop: + primary: "laptop-local" + fallback: "laptop" + check_host: "192.168.1.253" + timeout: "2s" # Background SSH Tunnel Definitions tunnels: diff --git a/config/ansible/tasks/global/utils/smart-ssh/smart-ssh.go b/config/ansible/tasks/global/utils/smart-ssh/smart-ssh.go index 2abbb47..2a85e70 100644 --- a/config/ansible/tasks/global/utils/smart-ssh/smart-ssh.go +++ b/config/ansible/tasks/global/utils/smart-ssh/smart-ssh.go @@ -836,7 +836,10 @@ func initLogging(cfg LoggingConfig) { } if strings.ToLower(cfg.Format) == "console" { - log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr}) + log.Logger = log.Output(zerolog.ConsoleWriter{ + Out: os.Stderr, + TimeFormat: "15:04:05", + }) } else { log.Logger = log.Output(os.Stderr) } diff --git a/config/autostart/io.github.mrvladus.List.desktop b/config/autostart/io.github.mrvladus.List.desktop old mode 100644 new mode 100755 diff --git a/config/home-manager/flake.lock b/config/home-manager/flake.lock index e714e15..c9fdb3a 100644 --- a/config/home-manager/flake.lock +++ b/config/home-manager/flake.lock @@ -25,11 +25,11 @@ ] }, "locked": { - "lastModified": 1753288231, - "narHash": "sha256-WcMW9yUDfER8kz4NdCaaI/ep0Ef91L+Nf7MetNzHZc4=", + "lastModified": 1753592768, + "narHash": "sha256-oV695RvbAE4+R9pcsT9shmp6zE/+IZe6evHWX63f2Qg=", "owner": "nix-community", "repo": "home-manager", - "rev": "7b5a978e00273b8676c530c03d315f5b75fae564", + "rev": "fc3add429f21450359369af74c2375cb34a2d204", "type": "github" }, "original": { @@ -41,11 +41,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1753345091, - "narHash": "sha256-CdX2Rtvp5I8HGu9swBmYuq+ILwRxpXdJwlpg8jvN4tU=", + "lastModified": 1753749649, + "narHash": "sha256-+jkEZxs7bfOKfBIk430K+tK9IvXlwzqQQnppC2ZKFj4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3ff0e34b1383648053bba8ed03f201d3466f90c9", + "rev": "1f08a4df998e21f4e8be8fb6fbf61d11a1a5076a", "type": "github" }, "original": { @@ -57,11 +57,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1753250450, - "narHash": "sha256-i+CQV2rPmP8wHxj0aq4siYyohHwVlsh40kV89f3nw1s=", + "lastModified": 1753694789, + "narHash": "sha256-cKgvtz6fKuK1Xr5LQW/zOUiAC0oSQoA9nOISB0pJZqM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fc02ee70efb805d3b2865908a13ddd4474557ecf", + "rev": "dc9637876d0dcc8c9e5e22986b857632effeb727", "type": "github" }, "original": {