mooooore stuffs
This commit is contained in:
+20
-1
@@ -26,6 +26,25 @@
|
||||
netcat
|
||||
neovim
|
||||
firefox
|
||||
];
|
||||
]
|
||||
++ (
|
||||
with lib; let
|
||||
# this function extracts the base file name from a path.
|
||||
basename = path: lib.lists.last (lib.strings.splitString "/" (toString path));
|
||||
|
||||
files = lib.filesystem.listFilesRecursive ./scripts;
|
||||
in
|
||||
# for each script found, create a derivation installed in $PATH
|
||||
lib.lists.forEach files (
|
||||
file: let
|
||||
scriptName = strings.removeSuffix ".sh" (basename file);
|
||||
in
|
||||
pkgs.writeScriptBin
|
||||
# (basename file) # the new package's name
|
||||
scriptName
|
||||
(builtins.readFile file)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user