change update script for ci branch

This commit is contained in:
chayleaf 2023-07-28 14:20:21 +07:00
parent 8acba4620b
commit 437f8af8cf
Signed by: chayleaf
GPG key ID: 78171AD46227E68E

View file

@ -7,9 +7,9 @@ mozilla-addons-to-nix \
./pkgs/firefox-addons/addons.json \
./pkgs/firefox-addons/generated.nix || echo "failed to update firefox addons"
nix flake update
if [ -z ${SUDO_ASKPASS+x} ]; then
sudo nixos-rebuild switch --flake . --option extra-builtins-file "$(pwd)/extra-builtins.nix"
else
sudo -A nixos-rebuild switch --flake . --option extra-builtins-file "$(pwd)/extra-builtins.nix"
fi
home-manager switch --flake . --option extra-builtins-file "$(pwd)/extra-builtins.nix"
#if [ -z ${SUDO_ASKPASS+x} ]; then
# sudo nixos-rebuild switch --flake . --option extra-builtins-file "$(pwd)/extra-builtins.nix"
#else
# sudo -A nixos-rebuild switch --flake . --option extra-builtins-file "$(pwd)/extra-builtins.nix"
#fi
#home-manager switch --flake . --option extra-builtins-file "$(pwd)/extra-builtins.nix"