Services: git pull submodules in autoupgrade script
This commit is contained in:
parent
de0bc659a8
commit
5f3018804a
|
@ -157,11 +157,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726592409,
|
||||
"narHash": "sha256-2Y6CDvD/BD43WLS77PHu6dUHbdUfFhuzkY8oJAecD/U=",
|
||||
"lastModified": 1726818100,
|
||||
"narHash": "sha256-z2V74f5vXqkN5Q+goFlhbFXY/dNaBAyeLpr2bxu4Eic=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "2ab00f89dd3ecf8012f5090e6d7ca1a7ea30f594",
|
||||
"rev": "1bbc1a5a1f4de7401c92db85b2119ed21bb4139d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -67,7 +67,8 @@ in
|
|||
# If we have changes (git diff returns 1), pull changes and run the update
|
||||
if [ $? -eq 1 ]; then
|
||||
echo "Updates found, running nixos-rebuild..."
|
||||
/run/wrappers/bin/sudo -u ${cfg.user} git pull --recurse-submodules
|
||||
/run/wrappers/bin/sudo -u ${cfg.user} git pull
|
||||
/run/wrappers/bin/sudo -u ${cfg.user} git submodule update --remote
|
||||
nixos-rebuild switch --flake .
|
||||
else
|
||||
echo "No updates found. Exiting."
|
||||
|
@ -99,7 +100,8 @@ in
|
|||
cd ${cfg.configDir}
|
||||
# Make sure we're up-to-date
|
||||
echo "Pulling the latest version..."
|
||||
/run/wrappers/bin/sudo -u ${cfg.user} git pull --recurse-submodules
|
||||
/run/wrappers/bin/sudo -u ${cfg.user} git pull
|
||||
/run/wrappers/bin/sudo -u ${cfg.user} git submodule update --remote
|
||||
/run/wrappers/bin/sudo -u ${cfg.user} nix flake update --commit-lock-file
|
||||
/run/wrappers/bin/sudo -u ${cfg.user} git push
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue