add help for nixos-edit
This commit is contained in:
parent
9845f71967
commit
6c9f1b8a02
1 changed files with 13 additions and 0 deletions
|
@ -3,6 +3,19 @@ with import <nixpkgs> {};
|
|||
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"
|
||||
|
|
Loading…
Add table
Reference in a new issue