Skip to content

GC roots doesn't contains the store path of nix config secret-key-files #14864

@n0099

Description

@n0099

Describe the bug

GC roots doesn't contains the store path of nix config secret-key-files.

Steps To Reproduce

$ nix-store --generate-binary-cache-key builder-name private.pem public.pem
{
  nix.settings.secret-key-files = ./private.pem;
}
$ nix-collect-garbage
$ nixos-rebuild switch # will result in error `/nix/store/xxx/private.pem` doesn't exists

Expected behavior

Keep this store path in GC roots.

Metadata

Additional context

This config is mentioned in https://wiki.nixos.org/wiki/Distributed_build#Using_remote_builders_as_substituters

Checklist


Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions