I am looking to setup my linux-builder instance on a macOS machine with a private key to sign the generated binary cache. I would like to get the key installed/managed with sops-nix rather than just using rsync and reference the file path.
Here is the minimal configuration to reproduce the issue:
However, this results in an attribute missing error:
# nh darwin switch
...
┃ … while evaluating the option `nix.linux-builder.systems':
┃
┃ … while evaluating definitions from `/nix/store/d13a0wj4pqcsz6a3anwy4p2jy6krfjv9-source/modules/nix/l…
┃
┃ … while evaluating the option `nix.linux-builder.package':
┃
┃ … while evaluating the error message for definitions for `settings', which is an option that does not…
┃
┃ … while evaluating a definition from `/nix/store/2gig690mdka8crca2f0kc33rcsbyixxi-source/machines/fes…
┃
┃ … while evaluating an attribute `secret-key-files`
┃
┃ (stack trace truncated; use '--show-trace' to show the full, detailed trace)
┃
┃ error: attribute '"builder/private_key"' missing
┃ at /nix/store/2gig690mdka8crca2f0kc33rcsbyixxi-source/machines/festoon/configuration.nix:25:30:
┃ 24| settings = {
┃ 25| secret-key-files = config.sops.secrets."builder/private_key".path;
┃ | ^
┃ 26| };
While this is technically solved, I would ideally like to keep sops-nix managed in the flake.nix rather than importing it in this anonymous function (is that the right term for ( ... ) in nix?) at nix.linux-builder.config.
Will wait a week or so for community to review, otherwise will mark this as solved.