fix: package theme engine and system scripts and fix env-update scriptability

This commit is contained in:
Bernardo Magri
2026-04-13 11:37:03 +01:00
parent f0800e60ca
commit 6f4741c060
8 changed files with 152 additions and 4 deletions

View File

@@ -32,8 +32,8 @@
gcad = "git commit -a --amend";
# NixOS commands
sys-update = "sudo nixos-rebuild switch --flake /etc/nixos#default --impure";
env-update = "nomarchy-preflight-migration && home-manager switch --flake /etc/nixos#default --impure";
sys-update = "nomarchy-sys-update";
env-update = "nomarchy-env-update";
};
};
}

View File

@@ -5,6 +5,7 @@
./options.nix
./state.nix
./nix.nix
./scripts.nix
./systemd.nix
./virtualization.nix
./fonts.nix

64
core/system/scripts.nix Normal file
View File

@@ -0,0 +1,64 @@
{ config, pkgs, lib, ... }:
let
# System script dependencies
systemScriptDeps = with pkgs; [
coreutils
gnused
gnugrep
findutils
gawk
jq
nixos-rebuild
home-manager
git
sudo
brightnessctl
playerctl
pamixer
pciutils
usbutils
networkmanager
lshw
parted
btrfs-progs
cryptsetup
gum
curl
wget
libnotify
bc
supergfxctl
systemd
];
nomarchy-system-scripts = 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
'';
};
in
{
environment.systemPackages = [ nomarchy-system-scripts ];
}