From ac5c540b2d5337c514e05d1b876fbb85c677f65d Mon Sep 17 00:00:00 2001 From: n3oney Date: Wed, 12 Apr 2023 23:42:55 +0200 Subject: [PATCH] feat: add utility function for binding expressions --- lib/stdlib-extended.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/stdlib-extended.nix b/lib/stdlib-extended.nix index d536194..92945a5 100644 --- a/lib/stdlib-extended.nix +++ b/lib/stdlib-extended.nix @@ -16,6 +16,16 @@ in }; }; + mkExprBinding = key: action: desc: + self.mkIf (key != null) { + "${key}" = { + inherit action desc; + lua = true; + silent = true; + expr = true; + }; + }; + mkBinding = key: action: desc: self.mkIf (key != null) { "${key}" = {