Skip to content

Instantly share code, notes, and snippets.

@grahamc

grahamc/foo.nix Secret

Last active November 2, 2017 18:33
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 grahamc/48c9fe406d2b54be450ce8e7c95bc94b to your computer and use it in GitHub Desktop.
Save grahamc/48c9fe406d2b54be450ce8e7c95bc94b to your computer and use it in GitHub Desktop.
# Put the following lines at line 96 of
# https://github.com/tumblr/jetpants/blob/master/testing/packages/mysql-container/service.nix#L96:
environment.etc."my.cnf".source = let
startLine = config.systemd.services.mysql.serviceConfig.ExecStart;
cnfArgument = builtins.elemAt (lib.splitString " " startLine) 1;
filename = lib.removePrefix "--defaults-extra-file=" cnfArgument;
in filename;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment