accept relative paths for flakes in disko/disko-install

builtins.getFlake wants absolute paths
This commit is contained in:
Jörg Thalheim authored and Jörg Thalheim committed 2024-03-11 16:10:06 +01:00
1 parent 5866ae41f7
commit a949edef70
2 files changed
+8

No files matched your search

+5
View File
@@ -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