From 205ad0dd5b8af7689ff8d1a75c98ba56b05087f0 Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Mon, 25 May 2026 15:37:38 -0400 Subject: [PATCH] updated secrets enum --- bin/lib/cmds.nu | 5 +++++ bin/lib/types.nu | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/lib/cmds.nu b/bin/lib/cmds.nu index a21e543..48dee6c 100644 --- a/bin/lib/cmds.nu +++ b/bin/lib/cmds.nu @@ -92,6 +92,11 @@ export def "skyg hm" [action: string@hm-actions, profile: string = "ari"] { home-manager $action --flake $".#($profile)" } +# List all secret names +export def "skyg secrets" [] { + secret-names +} + # Decrypt a secret from secrets/ folder export def "skyg decrypt" [secret: string@secret-names] { cd $REPO_ROOT diff --git a/bin/lib/types.nu b/bin/lib/types.nu index c083a37..ffb0f0d 100644 --- a/bin/lib/types.nu +++ b/bin/lib/types.nu @@ -1,3 +1,5 @@ +const REPO_ROOT = path self | path dirname | path dirname | path dirname + export def hm-actions [] { ["switch", "build"] } @@ -6,9 +8,8 @@ export def remote-cmds [] { ["test", "dry-activate", "run", "switch", "build"] } -const REPO_ROOT = path self | path dirname | path dirname | path dirname export def secret-names [] { cd $REPO_ROOT - ls secrets/*.age | get name | each { |f| $f | path basename | str replace ".age" "" } + glob secrets/*.age | each { |f| $f | path basename | str replace ".age" "" } }