local/bin/homeinit: Install initial packages to separate profile
parent
f1ff9a7460
commit
05e4c64bb6
|
@ -1,6 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
# TODO: Create a separate profile in /tmp to install gnupg, git, etc. then delete it when it's over.
|
||||
# TODO: Test if TTY and set pinentry appropriately without clobbering
|
||||
# ~/.gnupg/gpg-agent.conf
|
||||
# TODO: Run guix pull if OPT_UPDATE and if guix chekout is more than some days old, as specified by an environment variable.
|
||||
|
@ -12,6 +11,7 @@
|
|||
HTTPS_ROOT=https://gitlab.com/
|
||||
SSH_ROOT=git@gitlab.com:
|
||||
ROOT=$HTTPS_ROOT
|
||||
PROFILE=/tmp/homeinit-$USER/homeinit
|
||||
|
||||
[ -z "$SOURCEDIR" ] && SOURCEDIR="$HOME/personal"
|
||||
[ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config"
|
||||
|
@ -90,8 +90,10 @@ inpath() {
|
|||
|
||||
section "Initial packages"
|
||||
if inpath guix; then
|
||||
## TODO: Should openssh be an input of Git?
|
||||
guix package --install openssh gnupg git stow password-store
|
||||
## REVIEW: Should openssh be an input of Git? Mail sent to guix-devel.
|
||||
mkdir "$(dirname "$PROFILE")"
|
||||
guix package --profile="$PROFILE" --install openssh gnupg git stow password-store
|
||||
source "$PROFILE"/etc/profile
|
||||
elif inpath pacman; then
|
||||
sudo pacman --noconfirm -S --needed openssh gnupg git stow password-store
|
||||
fi
|
||||
|
@ -232,6 +234,11 @@ if inpath emacs; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if inpath guix; then
|
||||
section "Cleanup initial packages"
|
||||
rm -rv "$(dirname "$PROFILE")"
|
||||
fi
|
||||
|
||||
section "locate db"
|
||||
if [ -x ~/.local/bin/updatedb-local ]; then
|
||||
~/.local/bin/updatedb-local
|
||||
|
|
Loading…
Reference in New Issue