Skip to content

Instantly share code, notes, and snippets.

@cole-h
Created March 19, 2021 02:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cole-h/b7cae2c5ffb63d2483dd6cf25055d0ae to your computer and use it in GitHub Desktop.
Save cole-h/b7cae2c5ffb63d2483dd6cf25055d0ae to your computer and use it in GitHub Desktop.
{ config, ... }:
{
sops.secrets.service-password = {};
containers.myService =
let
passwordFile = config.sops.secrets.service-password.path;
in
{
config = { config, ... }: {
systemd.services.myService = {
serviceConfig = {
Environment="PASSWORDFILE=${passwordFile}";
};
};
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment