open(f'/nix/var/nix/profiles/system-{line.split()[0]}-link/boot.json', 'r')
)["org.nixos.bootspec.v1"]
for line in subprocess.run(
- ['nix-env', '--list-generations', '-p', '/nix/var/nix/profiles/system'],
+ [f'{NIX}/bin/nix-env', '--list-generations', '-p', '/nix/var/nix/profiles/system'],
check=True, text=True, stdout=subprocess.PIPE, stderr=sys.stderr
).stdout.split('\n')[:-1]
]