mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-10-05 20:27:20 +03:00
nixos-anywhere-pxe: fix nixos-anywhere path
works for development and with nix package
This commit is contained in:
parent
0e0558231a
commit
f214975b4f
@ -18,8 +18,13 @@ from typing import IO, Iterator, List, NoReturn, Optional, Tuple, Union
|
||||
|
||||
FILE = Union[None, int, IO]
|
||||
|
||||
NIXOS_ANYWHERE_SH = Path(__file__).parent.absolute() / "src/nixos-anywhere.sh"
|
||||
|
||||
# use nixos-anywhere if available, else use unpackaged shell script for development
|
||||
NIXOS_ANYWHERE_SH = shutil.which("nixos-anywhere")
|
||||
if NIXOS_ANYWHERE_SH is not None:
|
||||
# i prefer not having huge nix-store paths in the logs
|
||||
NIXOS_ANYWHERE_SH = "nixos-anywhere"
|
||||
else:
|
||||
NIXOS_ANYWHERE_SH = Path(__file__).parent.absolute() / "src/nixos-anywhere.sh"
|
||||
|
||||
|
||||
def run(
|
||||
|
Loading…
Reference in New Issue
Block a user