From 84e7b032a331b26d1f132fddd19db5ef1553cf7b Mon Sep 17 00:00:00 2001 From: Buddy Date: Sun, 7 Jun 2026 23:24:35 -0700 Subject: [PATCH] Refactor lego into module with env export --- dot_config/nushell/lib/run/mod.nu | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/dot_config/nushell/lib/run/mod.nu b/dot_config/nushell/lib/run/mod.nu index a271e77..5cfbcf8 100644 --- a/dot_config/nushell/lib/run/mod.nu +++ b/dot_config/nushell/lib/run/mod.nu @@ -1,10 +1,12 @@ -export def lego [domain] { - use secrets - load-env $secrets.lego.env - (^lego --accept-tos - --email $secrets.lego.email - --domains $domain - --dns $secrets.lego.dns - --path $'($env.HOME)/.local/share/lego' - run) +export module lego { + export-env { + use secrets + + load-env $secrets.lego.env + load-env { + LEGO_PATH: $'($env.HOME)/.local/share/lego' + LEGO_EMAIL: $secrets.lego.email + LEGO_DNS: $secrets.lego.dns + } + } }