This is just asking precision around the LoadCredential doc.
I couldn't understand how to actually use the feature.
The way i understood it was:
In order to pass an environment variable SECRET_KEY_BASE to a service
- add a
LoadCredential=secret_key_base:/run/secrets/unionBlue.secret_key_base.
- then add an environment variable
SECRET_KEY_BASE=$CREDENTIALS_DIRECTORY/secret_key_base;
I made sure that the /run/secrets/unionBlue.secret_key_base file (just a text file) is owned by the same user running the service.
However upon starting the service I run into the following errors
72670]: union-blue.service: Failed to set up mount namespacing: /run/systemd/unit-root/run/credentials/union-blue.service: No such file or directory
72670]: union-blue.service: Failed at step NAMESPACE spawning /nix/store/sxpb7vbxx1kwprnhsvr2cn7l0vssl9r2-union-0.0.1/bin/union: No such file or directory
I'm not sure what I missed.
I'm happy to test any suggestions and propose an amendment to the documentation.
This is just asking precision around the LoadCredential doc.
I couldn't understand how to actually use the feature.
The way i understood it was:
In order to pass an environment variable SECRET_KEY_BASE to a service
LoadCredential=secret_key_base:/run/secrets/unionBlue.secret_key_base.SECRET_KEY_BASE=$CREDENTIALS_DIRECTORY/secret_key_base;I made sure that the
/run/secrets/unionBlue.secret_key_basefile (just a text file) is owned by the same user running the service.However upon starting the service I run into the following errors
I'm not sure what I missed.
I'm happy to test any suggestions and propose an amendment to the documentation.