Commit eacab2d0e7c5
Changed files (2)
modules
core
overlays
modules/core/nix.nix
@@ -83,6 +83,7 @@ in
nixpkgs = {
overlays = [
+ (import ../../overlays/mkSecret.nix)
(import ../../overlays/sbr.nix)
(import ../../overlays/unstable.nix)
(import ../../nix).emacs
overlays/mkSecret.nix
@@ -0,0 +1,10 @@
+self: super:
+with builtins; with self.lib;
+{
+ mkSecret = path:
+ let
+ name = baseNameOf (toString path);
+ stub = toFile name "This is a stub!\n";
+ in
+ if pathExists path then path else self.lib.warn "Using stub for secrets/${name}" stub;
+}