From 1439d0d033a2ba4dcd9f39e1a1b8963ccbdf83d0 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}" = {