Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy_nixos: hash changes when files change in the working directory, even .gitignored files with flakes #68

Open
brainrake opened this issue Sep 21, 2022 · 0 comments

Comments

@brainrake
Copy link

brainrake commented Sep 21, 2022

Describe the bug
deploy_nixos evaluates an expression which has ./. as source. The hash of this derivation changes when local files change, even .gitignored files, even when using a flake. This causes unnecessary reevaluation.
https://github.com/tweag/terraform-nixos/blob/646cacb12439ca477c05315a7bfd49e9832bc4e3/deploy_nixos/nixos-instantiate.sh#L22

To Reproduce
terraform apply a deploy_nixos flake config. Change a .gitignored file. apply again. The evaluation is slow and the hash changes, requiring a new deploy.

Expected behavior
The evaluation should be fast and no changes should be detected.

Environment

  • OS name + version: NixOS unstable
  • Version of the code: 646cacb
@brainrake brainrake changed the title deploy_nixos nixos configuration hash changes when files change in the working directory, even with flakes deploy_nixos: hash changes when .gitignored files change in the working directory, even with flakes Sep 21, 2022
@brainrake brainrake changed the title deploy_nixos: hash changes when .gitignored files change in the working directory, even with flakes deploy_nixos: hash changes when files change in the working directory, even .gitignored files with flakes Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant