local/bin/homeinit: Fix profile installation.
parent
a3019e6ba5
commit
83b8b865d6
|
@ -220,17 +220,23 @@ popd
|
|||
guix_install_profile() {
|
||||
local profile
|
||||
local manifest
|
||||
manifest=$HOME/.package-lists/guix-$i-manifest.scm
|
||||
manifest=$HOME/.package-lists/guix-$1-manifest.scm
|
||||
if [ -f "$manifest" ]; then
|
||||
if [ "$i" = "default" ]; then
|
||||
if [ "$1" = "default" ]; then
|
||||
info "Installing default profile..."
|
||||
~/.config/guix/current/bin/guix package --manifest="$manifest" --keep-failed --substitute-urls="$SUBSTITUTE_URLS"
|
||||
. ~/.guix-profile/etc/profile
|
||||
else
|
||||
profile=$HOME/.guix-extra-profiles/$i/$i
|
||||
mkdir -p $(dirname "$profile")
|
||||
~/.config/guix/current/bin/guix package --manifest="$manifest" --keep-failed --profile="$profile" --substitute-urls="$SUBSTITUTE_URLS"
|
||||
if [ -f "$profile"/etc/profile ]; then
|
||||
. "$profile"/etc/profile
|
||||
profile=$HOME/.guix-extra-profiles/$1/$1
|
||||
if [ ! -d "$HOME/.guix-extra-profiles/$1/$1" ]; then
|
||||
info "Installing profile '$profile'..."
|
||||
mkdir -p $(dirname "$profile")
|
||||
~/.config/guix/current/bin/guix package --manifest="$manifest" --keep-failed --profile="$profile" --substitute-urls="$SUBSTITUTE_URLS"
|
||||
if [ -f "$profile"/etc/profile ]; then
|
||||
. "$profile"/etc/profile
|
||||
fi
|
||||
else
|
||||
info "Profile '$profile' already installed."
|
||||
fi
|
||||
fi
|
||||
else
|
||||
|
@ -250,7 +256,8 @@ if inpath guix; then
|
|||
guix_install_profile "$i"
|
||||
done
|
||||
if is_laptop; then
|
||||
guix_install_profile laptop laptop-gaming
|
||||
guix_install_profile laptop
|
||||
guix_install_profile laptop-gaming
|
||||
else
|
||||
guix_install_profile gaming
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue