user@hostname for nhms

This commit is contained in:
John Lancaster
2026-04-16 22:20:19 -05:00
parent dd47ae94bf
commit 510a026de7
+2 -1
View File
@@ -56,9 +56,10 @@
name = "nhms"; name = "nhms";
runtimeInputs = [ coreutils hostname nh ]; runtimeInputs = [ coreutils hostname nh ];
text = '' text = ''
USERNAME=''${USER:-$(whoami)}
HOSTNAME=$(hostname -s) HOSTNAME=$(hostname -s)
echo "Switching to the $HOSTNAME home-manager profile" echo "Switching to the $HOSTNAME home-manager profile"
nh home switch ${flakeDir} -c "$HOSTNAME" "$@" nh home switch ${flakeDir} -c "$USERNAME@$HOSTNAME" "$@"
''; '';
}; };