diff --git a/disko b/disko index 845b204..94ca2fe 100755 --- a/disko +++ b/disko @@ -118,6 +118,9 @@ if [[ -n "${flake+x}" ]]; then echo "For example, to use the output diskoConfigurations.foo from the flake.nix, append \"#foo\" to the flake-uri." exit 1 fi + if [[ -e "$flake" ]]; then + flake=$(realpath "$flake") + fi nix_args+=("--arg" "flake" "\"$flake\"") nix_args+=("--argstr" "flakeAttr" "$flakeAttr") nix_args+=(--extra-experimental-features flakes) diff --git a/disko-install b/disko-install index 330f896..fde0598 100755 --- a/disko-install +++ b/disko-install @@ -151,6 +151,11 @@ main() { flake="${BASH_REMATCH[1]}" flakeAttr="${BASH_REMATCH[2]}" fi + + if [[ -e "$flake" ]]; then + flake=$(realpath "$flake") + fi + if [[ -z ${flakeAttr-} ]]; then echo "Please specify the name of the NixOS configuration to be installed, as a URI fragment in the flake-uri." >&2 echo 'For example, to use the output nixosConfigurations.foo from the flake.nix, append "#foo" to the flake-uri.' >&2