documentation

This commit is contained in:
theArctesian
2025-09-25 07:50:48 -07:00
parent 85e493eb54
commit d8947e67b7
41 changed files with 4405 additions and 538 deletions
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
# Unix-style system builder - does one thing well
set -e
build_system() {
local flake_path="${1:-/etc/nixos}"
local config_name="${2:-omnixy}"
cd "$flake_path"
if [[ "${OMNIXY_QUIET:-}" == "1" ]]; then
sudo nixos-rebuild switch --flake ".#$config_name" >/dev/null 2>&1
else
echo "Building system configuration..."
sudo nixos-rebuild switch --flake ".#$config_name"
echo "System build complete"
fi
}
main() {
case "${1:-}" in
--help|-h)
echo "Usage: omnixy-build-system [flake-path] [config-name]"
echo "Builds and switches to NixOS configuration"
echo "Default: /etc/nixos omnixy"
exit 0
;;
--dry-run|-n)
shift
cd "${1:-/etc/nixos}"
nixos-rebuild build --flake ".#${2:-omnixy}"
;;
*)
build_system "$1" "$2"
;;
esac
}
main "$@"