From bfaf19c87dfa1a0063087ffa840e8d32b18ebb2d Mon Sep 17 00:00:00 2001 From: Marty Sluijtman Date: Fri, 12 Jan 2024 15:02:17 +0100 Subject: [PATCH] Other function --- nightmare.nix | 3 ++- nightmare/writeNuShellScript.nix | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 nightmare/writeNuShellScript.nix diff --git a/nightmare.nix b/nightmare.nix index 5ed8910..36c5929 100644 --- a/nightmare.nix +++ b/nightmare.nix @@ -1,3 +1,4 @@ { pkgs, ... }: { - getKittyColorscheme = pkgs.callPackage ./nightmare/getKittyColorscheme.nix { }; + getKittyColorscheme = pkgs.callPackage ./nightmare/getKittyColorscheme.nix {}; + writeNuShellScript = pkgs.callPackage ./nightmare/writeNuShellScript.nix {}; } diff --git a/nightmare/writeNuShellScript.nix b/nightmare/writeNuShellScript.nix new file mode 100644 index 0000000..f19abe6 --- /dev/null +++ b/nightmare/writeNuShellScript.nix @@ -0,0 +1,12 @@ +{ nushell, writeTextFile, ... }: +name: text: +let writeNuShellScript = + writeTextFile { + inherit name; + executable = true; + text = '' + #!${nushell}/bin/nu + ${text} + ''; + }; +in writeNuShellScript