Skip to content

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

Open
@brainrake

Description

@brainrake

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions