nix-community / nixos-anywhere

install nixos everywhere via ssh [maintainer=@numtide]
https://nix-community.github.io/nixos-anywhere/
MIT License
1.66k stars 116 forks source link

hardware config: fix git add logic #424

Closed picnoir closed 3 days ago

picnoir commented 1 week ago

Fixing the git add hardware config logic in case the user provides a relative path. We're doing two things:

  1. Failing loudly if the git add command fails. At that point, we already know git is in $PATH. If the git add fails, the evaluation will likely fail in a flake setting. Better fail early with a helpful git error message.
  2. We're resolving the hardware config path in the CLI parsing layer to make sure this path has the meaning the user intented it to have.
picnoir commented 1 week ago

The CI failure is related to a test case where we have git but the local repo is not git-tracked.

I guess we should check if the local repo is git-tracked before failing?

picnoir commented 6 days ago

CI fixed. This is ready for review.

Mic92 commented 3 days ago

@mergify queue

mergify[bot] commented 3 days ago

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at *548b4a9fcd1514442d24539af5ed4942871208c6*