user@hostname for nhms
This commit is contained in:
@@ -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" "$@"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user