local/bin/homeinit: Fix profile installation.

master
Pierre Neidhardt 2020-06-11 15:07:53 +02:00
parent a3019e6ba5
commit 83b8b865d6
1 changed files with 15 additions and 8 deletions

View File

@ -220,17 +220,23 @@ popd
guix_install_profile() { guix_install_profile() {
local profile local profile
local manifest local manifest
manifest=$HOME/.package-lists/guix-$i-manifest.scm manifest=$HOME/.package-lists/guix-$1-manifest.scm
if [ -f "$manifest" ]; then 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" ~/.config/guix/current/bin/guix package --manifest="$manifest" --keep-failed --substitute-urls="$SUBSTITUTE_URLS"
. ~/.guix-profile/etc/profile . ~/.guix-profile/etc/profile
else else
profile=$HOME/.guix-extra-profiles/$i/$i profile=$HOME/.guix-extra-profiles/$1/$1
mkdir -p $(dirname "$profile") if [ ! -d "$HOME/.guix-extra-profiles/$1/$1" ]; then
~/.config/guix/current/bin/guix package --manifest="$manifest" --keep-failed --profile="$profile" --substitute-urls="$SUBSTITUTE_URLS" info "Installing profile '$profile'..."
if [ -f "$profile"/etc/profile ]; then mkdir -p $(dirname "$profile")
. "$profile"/etc/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
fi fi
else else
@ -250,7 +256,8 @@ if inpath guix; then
guix_install_profile "$i" guix_install_profile "$i"
done done
if is_laptop; then if is_laptop; then
guix_install_profile laptop laptop-gaming guix_install_profile laptop
guix_install_profile laptop-gaming
else else
guix_install_profile gaming guix_install_profile gaming
fi fi