mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-30 14:11:04 +01:00
modules/environment/login: Fix fakeProcStat path
This commit is contained in:
parent
f246a9e82d
commit
993cc2abfb
3 changed files with 7 additions and 4 deletions
|
|
@ -44,7 +44,8 @@ writeText "login-inner" ''
|
||||||
${coreutils}/bin/chmod u+w $HOME/.config/nixpkgs/nix-on-droid.nix
|
${coreutils}/bin/chmod u+w $HOME/.config/nixpkgs/nix-on-droid.nix
|
||||||
|
|
||||||
echo "Installing first nix-on-droid generation..."
|
echo "Installing first nix-on-droid generation..."
|
||||||
${nix}/bin/nix build --no-link --file "<nix-on-droid>" nix-on-droid
|
${nix}/bin/nix build --extra-experimental-features nix-command \
|
||||||
|
--no-link --file "<nix-on-droid>" nix-on-droid
|
||||||
$(${nix}/bin/nix path-info --file "<nix-on-droid>" nix-on-droid)/bin/nix-on-droid switch
|
$(${nix}/bin/nix path-info --file "<nix-on-droid>" nix-on-droid)/bin/nix-on-droid switch
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ writeScript "login" ''
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -r /proc/stat ] && [ -e ${fakeProcStat} ]; then
|
if [ ! -r /proc/stat ] && [ -e ${installationDir}${fakeProcStat} ]; then
|
||||||
BIND_PROC_STAT="-b ${installationDir}${fakeProcStat}:/proc/stat"
|
BIND_PROC_STAT="-b ${installationDir}${fakeProcStat}:/proc/stat"
|
||||||
else
|
else
|
||||||
BIND_PROC_STAT=""
|
BIND_PROC_STAT=""
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,9 @@ function setupPasstroughOpts() {
|
||||||
|
|
||||||
function nixActivationPackage() {
|
function nixActivationPackage() {
|
||||||
local command="$1"
|
local command="$1"
|
||||||
local extraArgs=("${@:2}" "${PASSTHROUGH_OPTS[@]}")
|
local extraArgs=("${@:2}"
|
||||||
|
--extra-experimental-features nix-command
|
||||||
|
"${PASSTHROUGH_OPTS[@]}")
|
||||||
local nix=nix
|
local nix=nix
|
||||||
if [[ -n "${FLAKE_CONFIG_URI}" ]]; then
|
if [[ -n "${FLAKE_CONFIG_URI}" ]]; then
|
||||||
nix=@nix24@/bin/nix
|
nix=@nix24@/bin/nix
|
||||||
|
|
@ -134,7 +136,7 @@ while [[ $# -gt 0 ]]; do
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-F|--flake)
|
-F|--flake)
|
||||||
PASSTHROUGH_OPTS+=(--extra-experimental-features flakes --extra-experimental-features nix-command)
|
PASSTHROUGH_OPTS+=(--extra-experimental-features flakes)
|
||||||
# add "nixOnDroidConfigurations." as prefix in attribute name, e.g.
|
# add "nixOnDroidConfigurations." as prefix in attribute name, e.g.
|
||||||
# /path/to/flake#device -> /path/to/flake#nixOnDroidConfigurations.device
|
# /path/to/flake#device -> /path/to/flake#nixOnDroidConfigurations.device
|
||||||
FLAKE_CONFIG_URI="${1%#*}#nixOnDroidConfigurations.${1#*#}"
|
FLAKE_CONFIG_URI="${1%#*}#nixOnDroidConfigurations.${1#*#}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue