mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect.git
synced 2024-11-13 22:43:16 +00:00
remove installed Nix after switch-to-configuration boot
This commit is contained in:
parent
8462fff065
commit
4cf9f98105
|
@ -296,10 +296,6 @@ infect() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove nix installed by the "install" script.
|
|
||||||
rm -fv /nix/var/nix/profiles/default*
|
|
||||||
/nix/var/nix/profiles/system/sw/bin/nix-collect-garbage
|
|
||||||
|
|
||||||
# Reify resolv.conf (???)
|
# Reify resolv.conf (???)
|
||||||
[[ -L /etc/resolv.conf ]] && mv -v /etc/resolv.conf /etc/resolv.conf.lnk && cat /etc/resolv.conf.lnk > /etc/resolv.conf
|
[[ -L /etc/resolv.conf ]] && mv -v /etc/resolv.conf /etc/resolv.conf.lnk && cat /etc/resolv.conf.lnk > /etc/resolv.conf
|
||||||
|
|
||||||
|
@ -322,6 +318,10 @@ infect() {
|
||||||
if ! /nix/var/nix/profiles/system/bin/switch-to-configuration boot; then
|
if ! /nix/var/nix/profiles/system/bin/switch-to-configuration boot; then
|
||||||
echo "Failed!"; exit 1
|
echo "Failed!"; exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Remove nix installed by the "install" script.
|
||||||
|
rm -fv /nix/var/nix/profiles/default*
|
||||||
|
/nix/var/nix/profiles/system/sw/bin/nix-collect-garbage
|
||||||
}
|
}
|
||||||
|
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
Loading…
Reference in a new issue