diff options
Diffstat (limited to 'Omni/Ide/push.sh')
| -rwxr-xr-x | Omni/Ide/push.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Omni/Ide/push.sh b/Omni/Ide/push.sh index a713e46..79f46af 100755 --- a/Omni/Ide/push.sh +++ b/Omni/Ide/push.sh @@ -34,7 +34,6 @@ derive_service_name() { # Convert slashes to hyphens and lowercase echo "$base" | tr '/' '-' | tr '[:upper:]' '[:lower:]' } - # NixOS deploy (existing behavior) nixos_deploy() { local target="$1" @@ -50,11 +49,11 @@ nixos_deploy() { "$what/etc/systemd/system/domainname.service") # Check if we're deploying to ourselves (local deploy) - # Extract hostname from NixOS config path (e.g., Omni.Dev.Beryllium.nix -> beryllium) + # Extract hostname from NixOS config path (e.g., Omni/Dev/Beryllium.nix -> beryllium) local current_hostname current_hostname=$(hostname) local config_hostname - config_hostname=$(echo "$target" | sed -E 's/.*\.([^.]+)\.nix$/\1/' | tr '[:upper:]' '[:lower:]') + config_hostname=$(basename "$1" .nix | tr '[:upper:]' '[:lower:]') if [[ "$current_hostname" == "$config_hostname" ]] || [[ "$where" == "localhost" ]]; then echo -e "${YLW}info: push: local deploy detected${NC}" |
