From e8b7b6101dc37cc78ac95f9a844de552fe33b0e4 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 16 Apr 2023 02:44:50 -0500 Subject: [PATCH] Setup improvements --- common/bin/dotfiles-setup | 2 ++ os/linux/arch/provision.d/00-AS_ROOT-add-user.bash | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/common/bin/dotfiles-setup b/common/bin/dotfiles-setup index 437dc90..9550237 100755 --- a/common/bin/dotfiles-setup +++ b/common/bin/dotfiles-setup @@ -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 diff --git a/os/linux/arch/provision.d/00-AS_ROOT-add-user.bash b/os/linux/arch/provision.d/00-AS_ROOT-add-user.bash index 7861ded..4eb8c42 100755 --- a/os/linux/arch/provision.d/00-AS_ROOT-add-user.bash +++ b/os/linux/arch/provision.d/00-AS_ROOT-add-user.bash @@ -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'"