dotfiles/lib/load_secrets.nix
magic_rb 880ffeec87
Fix evaluation without secrets
Signed-off-by: magic_rb <richard@brezak.sk>
2023-10-21 17:46:17 +02:00

15 lines
381 B
Nix

# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
#
# SPDX-License-Identifier: LGPL-3.0-or-later
{ lib, ... }:
{
flake.libOverlays.loadSecrets =
final: prev: {
loadSecrets = path:
if builtins.pathExists "${path}/default.nix" then
import path { lib = final; }
else
builtins.trace "Not loading secrets!" {};
};
}