Setup improvements
This commit is contained in:
parent
fdaab5b5ba
commit
e8b7b6101d
|
@ -68,6 +68,8 @@ for s in $c/lytedev-env/*/dotfiles-setup.d.fish
|
||||||
source $s $dfp $h $c
|
source $s $dfp $h $c
|
||||||
end
|
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
|
rm -f $ENV_PATH/empty
|
||||||
ln -s $DOTFILES_PATH/common/empty-env $ENV_PATH/empty
|
ln -s $DOTFILES_PATH/common/empty-env $ENV_PATH/empty
|
||||||
|
|
||||||
|
|
|
@ -14,13 +14,17 @@ if grep -E "^$u" /etc/passwd; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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
|
pacman -Sy --needed --noconfirm sudo
|
||||||
echo '%admin ALL=(ALL) ALL' >> /etc/sudoers.d/admin-group-sudoers
|
echo '%admin ALL=(ALL) ALL' >> /etc/sudoers.d/admin-group-sudoers
|
||||||
groupadd admin 2>/dev/null
|
groupadd admin 2>/dev/null
|
||||||
mkdir --parents "$ud/.home" "$ud/dl"
|
mkdir --parents "$ud/.home" "$ud/dl"
|
||||||
useradd --home-dir "$ud/.home" \
|
useradd --home-dir "$ud/.home" \
|
||||||
--groups "admin,users,uucp,lock" \
|
--groups "admin,users,uucp,lock" \
|
||||||
--shell "/bin/bash" \
|
--shell "/usr/bin/fish" \
|
||||||
"$u"
|
"$u"
|
||||||
chown --recursive "$u:$u" "$ud"
|
chown --recursive "$u:$u" "$ud"
|
||||||
echo "Setting password for user '$u'"
|
echo "Setting password for user '$u'"
|
||||||
|
|
Reference in a new issue