aboutsummaryrefslogtreecommitdiffstats
path: root/home-manager
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-02-21 16:54:44 +0100
committerene <ene@sils.li>2023-02-21 16:54:44 +0100
commit4ce7e47cb582639906a1449e917b5aaf009a68ab (patch)
treea60da41284dce1eabdd39a8f70ec93f6f16a7ea0 /home-manager
parentFix: Further bc of the home issue (diff)
downloadnixos-config-4ce7e47cb582639906a1449e917b5aaf009a68ab.zip
Fix(lf): Fixed script invocations
Diffstat (limited to 'home-manager')
-rw-r--r--home-manager/config/lf/default.nix49
1 files changed, 16 insertions, 33 deletions
diff --git a/home-manager/config/lf/default.nix b/home-manager/config/lf/default.nix
index e64225b1..c7e59bb8 100644
--- a/home-manager/config/lf/default.nix
+++ b/home-manager/config/lf/default.nix
@@ -4,20 +4,24 @@
sysLib,
...
}: let
+ functionCall = {
+ file,
+ dependencies,
+ ...
+ }:
+ sysLib.makeShellScriptWithLibrary {
+ name = "${file}";
+ script = file;
+ inherit dependencies;
+ }
+ + "/bin/${file}";
shell = {
file,
dependencies,
...
}: ''
''${{
- ${
- builtins.readFile (sysLib.makeShellScriptWithLibrary {
- name = "NAME_FOR_A_SHELL_SCRIPT";
- script = file;
- inherit dependencies;
- }
- + /bin/NAME_FOR_A_SHELL_SCRIPT)
- }
+ exec ${functionCall {inherit file dependencies;}}
}}
''; # closes the lf tui
pipe = {
@@ -26,14 +30,7 @@
...
}: ''
%{{
- ${
- builtins.readFile (sysLib.makeShellScriptWithLibrary {
- name = "NAME_FOR_A_SHELL_SCRIPT";
- script = file;
- inherit dependencies;
- }
- + /bin/NAME_FOR_A_SHELL_SCRIPT)
- }
+ exec ${functionCall {inherit file dependencies;}}
}}
''; # runs the command in the ui/term bar
async = {
@@ -42,14 +39,7 @@
...
}: ''
&{{
- ${
- builtins.readFile (sysLib.makeShellScriptWithLibrary {
- name = "NAME_FOR_A_SHELL_SCRIPT";
- script = file;
- inherit dependencies;
- }
- + /bin/NAME_FOR_A_SHELL_SCRIPT)
- }
+ exec ${functionCall {inherit file dependencies;}}
}}
''; # runs the command in the background
wait = {
@@ -58,14 +48,7 @@
...
}: ''
!{{
- ${
- builtins.readFile (sysLib.makeShellScriptWithLibrary {
- name = "NAME_FOR_A_SHELL_SCRIPT";
- script = file;
- inherit dependencies;
- }
- + /bin/NAME_FOR_A_SHELL_SCRIPT)
- }
+ exec ${functionCall {inherit file dependencies;}}
}}
''; # adds a prompt after the command has run
in {
@@ -182,7 +165,7 @@ in {
gnutar
unzip
# TODO this is unfree! unrar
-
+
p7zip
;
};