Setup improvements

This commit is contained in:
Daniel Flanagan 2023-04-16 02:44:50 -05:00
parent fdaab5b5ba
commit e8b7b6101d
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
2 changed files with 7 additions and 1 deletions

View file

@ -68,6 +68,8 @@ for s in $c/lytedev-env/*/dotfiles-setup.d.fish
source $s $dfp $h $c
end
set -q ENV_PATH || set ENV_PATH $XDG_CONFIG_HOME/lytedev-env
set -q DOTFILES_PATH || set DOTFILES_PATH $XDG_CONFIG_HOME/lytedev-dotfiles
rm -f $ENV_PATH/empty
ln -s $DOTFILES_PATH/common/empty-env $ENV_PATH/empty

View file

@ -14,13 +14,17 @@ if grep -E "^$u" /etc/passwd; then
exit 0
fi
# TODO: setup dotfiles repo?
# TODO: can we copy the envs from /root/.config/lytedev-env in case being setup
# from a script entirely?
pacman -Sy --needed --noconfirm sudo
echo '%admin ALL=(ALL) ALL' >> /etc/sudoers.d/admin-group-sudoers
groupadd admin 2>/dev/null
mkdir --parents "$ud/.home" "$ud/dl"
useradd --home-dir "$ud/.home" \
--groups "admin,users,uucp,lock" \
--shell "/bin/bash" \
--shell "/usr/bin/fish" \
"$u"
chown --recursive "$u:$u" "$ud"
echo "Setting password for user '$u'"