#!/bin/sh set -efu "${enableDebug:-}" has() { command -v "$1" >/dev/null && echo "y" || echo "n" } isNixos=$(if test -f /etc/os-release && grep -Eq 'ID(_LIKE)?="?nixos"?' /etc/os-release; then echo "y"; else echo "n"; fi) cat </dev/null 2>/dev/null || ! ip -6 r g :: >/dev/null 2>/dev/null; then echo "n"; else echo "y"; fi) hasTar=$(has tar) hasCpio=$(has cpio) hasSudo=$(has sudo) hasDoas=$(has doas) hasWget=$(has wget) hasCurl=$(has curl) hasSetsid=$(has setsid) hasNixOSFacter=$(command -v nixos-facter >/dev/null && echo "y" || echo "n") FACTS