home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

mkSecret.nix (259B)


      1 self: super:
      2 with builtins; with self.lib;
      3 {
      4   mkSecret = path:
      5     let
      6       name = baseNameOf (toString path);
      7       stub = toFile name "This is a stub!\n";
      8     in
      9     if pathExists path then path else self.lib.warn "Using stub for secrets/${name}" stub;
     10 }