diff --git a/home.nix b/home.nix index 2d0805d..519706b 100644 --- a/home.nix +++ b/home.nix @@ -41,6 +41,7 @@ in hyfetch libreoffice (import ./traewelling.script.nix) + #marker.pkgs.end# ] ++ (with pkgs; [ freecad nheko diff --git a/nixos-edit.script.nix b/nixos-edit.script.nix index 1cfdef4..7b6ab9e 100644 --- a/nixos-edit.script.nix +++ b/nixos-edit.script.nix @@ -14,6 +14,7 @@ pkgs.writeShellScriptBin "nixos-edit" '' echo " - update -- update the system" echo " - clean -- does housekeeping" echo " - init -- initialize the system (only run once)" + echo " - add -- installs a package" echo echo "edit is the default mode." exit 0 @@ -84,7 +85,10 @@ pkgs.writeShellScriptBin "nixos-edit" '' exit fi - [ "$1" = "edit" ] || [ "$1" = "" ] || [ "$1" = "push" ] + [ "$1" = "edit" ] || + [ "$1" = "" ] || + [ "$1" = "push" ] || + [ "$1" = "add" ] PUSH=$? cd /etc/nixos @@ -94,6 +98,10 @@ pkgs.writeShellScriptBin "nixos-edit" '' if [ "$1" = "edit" ] || [ "$1" = "" ] || [ "$1" = "test" ] ; then sudo hx . fi + if [ "$1" = "add" ] ; then + sed -i -E "s/#marker.pkgs.end#/$2\n #marker.pkgs.end#" home.nix + git diff + fi if [ $PUSH = 0 ] ; then git add . EDITOR=hx git commit -a || exit