mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect.git
synced 2024-11-25 13:01:28 +00:00
do not keep root/.nix-defexpr/channels after reboot
This commit is contained in:
parent
5169969e03
commit
7e79a26715
19
nixos-infect
19
nixos-infect
|
@ -277,19 +277,7 @@ installNix() {
|
||||||
}
|
}
|
||||||
|
|
||||||
infect() {
|
infect() {
|
||||||
# Add nix build users
|
# install multiuser (system-wide with nix-daemon) Nix in the current system
|
||||||
# FIXME run only if necessary, rather than defaulting true
|
|
||||||
# groupadd nixbld -g 30000 || true
|
|
||||||
# for i in {1..10}; do
|
|
||||||
# useradd -c "Nix build user $i" -d /var/empty -g nixbld -G nixbld -M -N -r -s "$(which nologin)" "nixbld$i" || true
|
|
||||||
# done
|
|
||||||
# TODO use addgroup and adduser as fallbacks
|
|
||||||
#addgroup nixbld -g 30000 || true
|
|
||||||
#for i in {1..10}; do adduser -DH -G nixbld nixbld$i || true; done
|
|
||||||
|
|
||||||
# install Nix in the current system
|
|
||||||
# (this should create system nixbld users too)
|
|
||||||
# curl -L "https://releases.nixos.org/nix/nix-$NIX_VERSION/install" | $SHELL
|
|
||||||
if ! installNix; then
|
if ! installNix; then
|
||||||
echo "Nix installation failed!"
|
echo "Nix installation failed!"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -326,9 +314,8 @@ infect() {
|
||||||
|
|
||||||
# Stage the Nix coup d'état
|
# Stage the Nix coup d'état
|
||||||
touch /etc/NIXOS
|
touch /etc/NIXOS
|
||||||
echo etc/nixos > /etc/NIXOS_LUSTRATE
|
echo etc/nixos > /etc/NIXOS_LUSTRATE
|
||||||
echo etc/resolv.conf >> /etc/NIXOS_LUSTRATE
|
echo etc/resolv.conf >> /etc/NIXOS_LUSTRATE
|
||||||
echo root/.nix-defexpr/channels >> /etc/NIXOS_LUSTRATE
|
|
||||||
|
|
||||||
rm -rf /boot.bak
|
rm -rf /boot.bak
|
||||||
((isEFI)) && umount "$ESP"
|
((isEFI)) && umount "$ESP"
|
||||||
|
|
Loading…
Reference in a new issue