initial commit
This commit is contained in:
40
modules/home/scripts.nix
Normal file
40
modules/home/scripts.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
# Core dependencies needed by most Nomarchy scripts
|
||||
nomarchy-deps = with pkgs; [
|
||||
gum
|
||||
hyprland
|
||||
procps
|
||||
libnotify
|
||||
coreutils
|
||||
gnused
|
||||
gnugrep
|
||||
pciutils
|
||||
findutils
|
||||
jq
|
||||
swww
|
||||
xmlstarlet
|
||||
# Add any others commonly used in bin/
|
||||
];
|
||||
|
||||
nomarchy-scripts = pkgs.stdenv.mkDerivation {
|
||||
pname = "nomarchy-scripts";
|
||||
version = "1.0.0";
|
||||
src = ../../bin;
|
||||
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -r * $out/bin/
|
||||
|
||||
# Wrap every script to ensure dependencies are in PATH
|
||||
find $out/bin -type f -exec wrapProgram {} \
|
||||
--prefix PATH : ${lib.makeBinPath nomarchy-deps} \;
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = [ nomarchy-scripts ];
|
||||
}
|
||||
Reference in New Issue
Block a user