MatthewCroughan / nixinate

Another NixOS Deployment Tool - Nixinate your systems 🕶️
MIT License
240 stars 32 forks source link

Use explicit cross-platform flock rather than impurely referencing it #30

Closed MatthewCroughan closed 1 year ago

MatthewCroughan commented 1 year ago

This solves #29

Kranzes commented 1 year ago

Could also use flock from util-linux

MatthewCroughan commented 1 year ago

@Kranzes Best to avoid locking ourselves into Linux. Right now, technically all of our utilities are not linux specific.

Kranzes commented 1 year ago

Does nixos-rebuild work on darwin?

MatthewCroughan commented 1 year ago

@Kranzes No, but I was thinking of having multiple backends, which would solve that problem. So the deployment can be implemented by any backend.

Gerschtli commented 1 year ago

I am having trouble with this change because the locally references nix store path of flock is not available on my target machine, resulting in

sudo: /nix/store/wrdk8aqwq7h0lyjglkqgf4x7izd2ymsc-flock-0.2.3/bin/flock: command not found

But I would not be able to call nix store --realise /nix/store/wrdk8aqwq7h0lyjglkqgf4x7izd2ymsc-flock-0.2.3/bin/flock after nix copy with a file lock using flock, some chicken-egg problem here..

Should I create a separate issue for it?

MatthewCroughan commented 1 year ago

@Gerschtli That's interesting, and it should have been caught by my VM Tests, this indicates my VM Tests are not good enough.