From 6c9f1b8a026798a3ac83972d0d4821a428a5feec Mon Sep 17 00:00:00 2001 From: TudbuT Date: Sat, 19 Oct 2024 03:37:32 +0200 Subject: [PATCH] add help for nixos-edit --- nixos-edit.script.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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"