2023-01-28 20:49:10 +00:00
|
|
|
self: with self; ''
|
2021-05-30 19:10:28 +00:00
|
|
|
case $1 in
|
|
|
|
rebuild)
|
|
|
|
shift;
|
|
|
|
exec sudo nixos-rebuild switch --flake "/etc/nixos#installed-host" $@
|
|
|
|
;;
|
|
|
|
update)
|
|
|
|
shift;
|
|
|
|
cd /etc/nixos
|
|
|
|
git pull
|
|
|
|
exec nix flake update
|
|
|
|
;;
|
|
|
|
option)
|
|
|
|
shift;
|
|
|
|
exec nixos-option -I nixpkgs=/etc/nixos/lib/compat $@
|
|
|
|
;;
|
2022-08-14 16:03:32 +00:00
|
|
|
help)
|
|
|
|
shift;
|
|
|
|
exec xdg-open http://help.local/
|
|
|
|
;;
|
2021-05-30 19:10:28 +00:00
|
|
|
*)
|
|
|
|
if [[ "$@" != "" ]]; then
|
|
|
|
echo "Unknown command: psos $@"
|
|
|
|
echo ""
|
|
|
|
fi
|
|
|
|
echo "Usage: psos [COMMAND]"
|
|
|
|
echo " rebuild Rebuild the configuration and switch to it"
|
|
|
|
echo " update Pull git and update flake.lock"
|
|
|
|
echo " option [path] See the current value for an option in the flake config. Example: psos option nix.nixPath"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
''
|