Created
June 4, 2020 22:10
-
-
Save lovesegfault/da3563c8ca5de65e7c14895146b57f9e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self: super: | |
with builtins; with self.lib; | |
{ | |
mkSecret = { ... }@args: | |
let | |
name = baseNameOf (toString args.file); | |
stub = toFile name "This is a stub!\n"; | |
file = | |
if pathExists args.file then | |
args.file | |
else | |
self.lib.warn "Using stub for secrets/${name}" stub; | |
in | |
args // { inherit file; }; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment