mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-06 08:47:00 +00:00
Revert "{activation-scripts,activate-system}: purify environment"
This shouldn’t actually be split out from the Plan because of the
current use of `$HOME` in the defaults for channel‐based setups.
This reverts commit 4bff4bc8ae
.
This commit is contained in:
parent
f43dac477e
commit
cc9c8408bb
2 changed files with 1 additions and 25 deletions
|
@ -10,14 +10,7 @@
|
||||||
script = ''
|
script = ''
|
||||||
set -e
|
set -e
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
export PATH="${pkgs.gnugrep}/bin:${pkgs.coreutils}/bin:@out@/sw/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
export PATH="${pkgs.gnugrep}/bin:${pkgs.coreutils}/bin:@out@/sw/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
||||||
export USER=root
|
|
||||||
export LOGNAME=root
|
|
||||||
export HOME=~root
|
|
||||||
export SHELL=$BASH
|
|
||||||
export LANG=C
|
|
||||||
export LC_CTYPE=UTF-8
|
|
||||||
|
|
||||||
systemConfig=$(cat ${config.system.profile}/systemConfig)
|
systemConfig=$(cat ${config.system.profile}/systemConfig)
|
||||||
|
|
||||||
|
|
|
@ -37,33 +37,16 @@ in
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
system.activationScripts.script.text = ''
|
system.activationScripts.script.text = ''
|
||||||
#!/usr/bin/env -i ${stdenv.shell}
|
#! ${stdenv.shell}
|
||||||
# shellcheck shell=bash
|
|
||||||
# shellcheck disable=SC2096
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
export PATH="${pkgs.gnugrep}/bin:${pkgs.coreutils}/bin:@out@/sw/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
export PATH="${pkgs.gnugrep}/bin:${pkgs.coreutils}/bin:@out@/sw/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
||||||
export USER=root
|
|
||||||
export LOGNAME=root
|
|
||||||
export HOME=~root
|
|
||||||
export SHELL=$BASH
|
|
||||||
export LANG=C
|
|
||||||
export LC_CTYPE=UTF-8
|
|
||||||
|
|
||||||
systemConfig=@out@
|
systemConfig=@out@
|
||||||
|
|
||||||
# Ensure a consistent umask.
|
# Ensure a consistent umask.
|
||||||
umask 0022
|
umask 0022
|
||||||
|
|
||||||
cd /
|
|
||||||
|
|
||||||
if [[ $(id -u) -ne 0 ]]; then
|
|
||||||
printf >&2 '\e[1;31merror: `activate` must be run as root\e[0m\n'
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
${cfg.activationScripts.preActivation.text}
|
${cfg.activationScripts.preActivation.text}
|
||||||
|
|
||||||
# We run `etcChecks` again just in case someone runs `activate`
|
# We run `etcChecks` again just in case someone runs `activate`
|
||||||
|
|
Loading…
Add table
Reference in a new issue