Files
nixos-config/apps/aarch64-darwin/apply
2026-03-05 15:41:41 +00:00

16 lines
430 B
Plaintext
Executable File

#!/usr/bin/env nu
use ../common.nu *
def main [hostname?: string, ...rest: string] {
let host = if ($hostname | is-empty) {
try { scutil --get LocalHostName | str trim } catch { hostname -s | str trim }
} else { $hostname }
print_info $"Applying configuration for ($host)"
nix run nix-darwin -- switch --flake $".#($host)" ...$rest
print_success "Configuration applied successfully"
}