about summary refs log tree commit diff stats
path: root/sys/nixpkgs/pkgs/update_pkgs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsys/nixpkgs/pkgs/update_pkgs8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/nixpkgs/pkgs/update_pkgs b/sys/nixpkgs/pkgs/update_pkgs
index df26784b..d6684f06 100755
--- a/sys/nixpkgs/pkgs/update_pkgs
+++ b/sys/nixpkgs/pkgs/update_pkgs
@@ -14,10 +14,12 @@ fd . --type directory --max-depth 1 | while read -r dir; do
     if [ -f update.sh ]; then
         printf "\033[34;1m> \033[0m%s" "\033[32;1mRunning '${dir}update.sh'\033[0m";
 
-        nix flake update
+        if [ -f flake.nix ]; then
+            nix flake update
 
-        direnv allow
-        eval "$(direnv export bash)"
+            direnv allow
+            eval "$(direnv export bash)"
+        fi
 
         ./update.sh
     fi