diff --git a/Justfile b/Justfile index 2cce8b8..e3a0be5 100755 --- a/Justfile +++ b/Justfile @@ -315,3 +315,9 @@ switch-gpg-card: # refresh the gpg agent gpg-connect-agent "scd serialno" "learn --force" /bye gpg --card-status + +# Connect to `remote` UUID, and turn it into a short name +uuid-to-device-name remote: + #!/usr/bin/env bash + set -e -o pipefail + ssh {{remote}} 'nix run nixpkgs.dmidecode -c dmidecode -s system-uuid' | xxhsum --quiet -H1 | awk '{print $1}' diff --git a/shell.nix b/shell.nix index b8ce6da..8df0295 100644 --- a/shell.nix +++ b/shell.nix @@ -26,6 +26,7 @@ stdenv.mkDerivation { nmap sysstat lshw + xxHash ]; # Set Environment Variables