New nu shell function

This commit is contained in:
Nox Sluijtman 2024-01-13 11:03:47 +01:00
parent bfaf19c87d
commit 45d5a4c8e9
2 changed files with 15 additions and 0 deletions

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
getKittyColorscheme = pkgs.callPackage ./nightmare/getKittyColorscheme.nix {};
writeNuShellScript = pkgs.callPackage ./nightmare/writeNuShellScript.nix {};
writeNuShellScriptBin = pkgs.callPackage ./nightmare/writeNuShellScriptBin.nix {};
}

View file

@ -0,0 +1,14 @@
{ nushell, writeTextFile, ... }:
name: text:
let writeNuShellScriptBin =
writeTextFile {
inherit name;
executable = true;
destination = "/bin/${name}";
text = ''
#!${nushell}/bin/nu
${text}
'';
meta.mainProgram = name;
};
in writeNuShellScriptBin