MatthewCroughan / nixinate

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

Fix hermetic remote builds and tests #21

Closed MatthewCroughan closed 2 years ago

MatthewCroughan commented 2 years ago

In the previous attempt to add this feature, I had forgotten to add the new tests to tests/default.nix, which meant I believed the feature worked when it did not. Additionally, real world testing shows that if the path does not exist on the remote already, that nix build --store will not work and will throw the following error: 'path '/nix/store/foo' is required, but there is no substituter that can build it' To fix this, I've decided to use nix copy --derivation and then nix-store --realise on the remote. A lot of refactoring is needed to make this codebase presentable anyway, so this hack is fine for now, though it is admittedly an unclean implementation.

https://github.com/MatthewCroughan/nixinate/pull/20