nixos-option: add warn when Flake is used

This commit is contained in:
Thiago Kenji Okada
2025-01-01 13:18:02 +00:00
parent b8842b8bea
commit f6c458dfc1
@@ -66,6 +66,8 @@ if [[ -z "$flake" ]] && [[ -e /etc/nixos/flake.nix ]] && [[ "$no_flake" == "fals
fi
if [[ -n "$flake" ]]; then
echo >&2 "[WARN] Flake support in nixos-option is experimental and has known issues."
if [[ $flake =~ ^(.*)\#([^\#\"]*)$ ]]; then
flake="${BASH_REMATCH[1]}"
flakeAttr="${BASH_REMATCH[2]}"