about summary refs log tree commit diff stats
path: root/sys/nixpkgs/pkgs/update_pkgs
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2024-01-28 20:58:58 +0100
committerSoispha <soispha@vhack.eu>2024-01-28 20:58:58 +0100
commitba72754b61dfb447d0031e6608920059bb571553 (patch)
tree28b107a2b4bae7863600cd03a604739f7bb7c098 /sys/nixpkgs/pkgs/update_pkgs
parentbuild(treewide): Update (diff)
downloadnixos-config-ba72754b61dfb447d0031e6608920059bb571553.tar.gz
nixos-config-ba72754b61dfb447d0031e6608920059bb571553.zip
fix(sys/nixpkgs/update_pkgs): Allow to hide expansive updates behind flag
Diffstat (limited to 'sys/nixpkgs/pkgs/update_pkgs')
-rwxr-xr-xsys/nixpkgs/pkgs/update_pkgs13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/nixpkgs/pkgs/update_pkgs b/sys/nixpkgs/pkgs/update_pkgs
index d6684f06..8392fb1c 100755
--- a/sys/nixpkgs/pkgs/update_pkgs
+++ b/sys/nixpkgs/pkgs/update_pkgs
@@ -12,16 +12,13 @@ fd . --type directory --max-depth 1 | while read -r dir; do
     cd "$dir" || die "Dir '$dir' does not exist"
 
     if [ -f update.sh ]; then
-        printf "\033[34;1m> \033[0m%s" "\033[32;1mRunning '${dir}update.sh'\033[0m";
+        printf "\033[34;1m> \033[0m\033[34;1m%s\033[0m\n" "Running '${dir}update.sh'";
 
-        if [ -f flake.nix ]; then
-            nix flake update
+        [ -f flake.nix ] && nix flake update
 
-            direnv allow
-            eval "$(direnv export bash)"
-        fi
-
-        ./update.sh
+        direnv allow
+        eval "$(direnv export bash 2>/dev/null)"
+        ./update.sh "$@"
     fi
     cd - > /dev/null || die "Bug: Last dir does not exist"
 done