diff --git a/nixos-edit.script.nix b/nixos-edit.script.nix index 7993841..65345ff 100644 --- a/nixos-edit.script.nix +++ b/nixos-edit.script.nix @@ -3,6 +3,19 @@ with import {}; pkgs.writeShellScriptBin "nixos-edit" '' #!/bin/sh + if [ "$1" = "help" ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then + echo "nixos-edit by tudbut" + echo + echo "supports commands:" + echo " - pull -- pulls the changes and switches to them" + echo " - edit -- edits the OS, pushes it, and switches" + echo " - update -- update the system" + echo " - init -- initialize the system (only run once)" + echo + echo "edit is the default mode." + exit 0 + fi + if [ "$1" = "init" ] ; then if [ "$(whoami)" = root ] ; then echo "re-executing as tudbut"