fix: resolve evaluation purity, missing packages, and brittle paths

This commit is contained in:
Bernardo Magri
2026-04-13 19:50:09 +01:00
parent cabc668c77
commit d9c35f5ff6
13 changed files with 176 additions and 192 deletions

View File

@@ -0,0 +1,60 @@
{ pkgs, lib, ... }:
let
# System script dependencies
systemScriptDeps = with pkgs; [
coreutils
gnused
gnugrep
findutils
gawk
jq
nixos-rebuild
pkgs.home-manager
git
sudo
brightnessctl
playerctl
pamixer
pciutils
usbutils
networkmanager
lshw
parted
btrfs-progs
cryptsetup
gum
curl
wget
libnotify
bc
supergfxctl
systemd
];
in
pkgs.stdenv.mkDerivation {
pname = "nomarchy-system-scripts";
version = "1.0.0";
src = ./scripts;
nativeBuildInputs = [ pkgs.makeWrapper ];
installPhase = ''
mkdir -p $out/bin
cp * $out/bin/
chmod +x $out/bin/*
patchShebangs $out/bin
'';
postFixup = ''
deps="${lib.makeBinPath systemScriptDeps}"
for file in $out/bin/*; do
if [ -f "$file" ]; then
wrapProgram "$file" \
--prefix PATH : "$deps" \
--set NOMARCHY_PATH "/etc/nixos/nomarchy"
fi
done
'';
}