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-23 14:58:27 +0100
committerSoispha <soispha@vhack.eu>2024-01-23 14:58:27 +0100
commit24c6fb9fd93fbdfb2a7085b513383229b8231739 (patch)
tree71583a3154e3a13bcbd1c6b125887346cd6f6f94 /sys/nixpkgs/pkgs/update_pkgs
parentfeat(sys/nixpkgs/pkgs): Add update scripts (diff)
downloadnixos-config-24c6fb9fd93fbdfb2a7085b513383229b8231739.zip
build(treewide): Update
Diffstat (limited to 'sys/nixpkgs/pkgs/update_pkgs')
-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