Skip to content

Commit

Permalink
Merge branch 'feature/ArchLinuxFix' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jcchikikomori committed Jan 24, 2024
2 parents 19bb0c8 + 821eaca commit f065e9e
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci-arch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
./install-dotstow.sh
- name: Simulate Stowing
run: |
mkdir -p /home/admin/.dotfiles
mkdir -p /home/admin/.local/state/dotstow
mkdir -p /home/johnc/.dotfiles
mkdir -p /home/johnc/.local/state/dotstow
ls -lah $PWD
cp -r $PWD/* /home/admin/.dotfiles/
sudo -u admin bash -c 'ls -lah $HOME/.dotfiles/'
sudo -u admin bash -c 'cd $HOME/.dotfiles/arch && ./stowme.sh'
cp -r $PWD/* /home/johnc/.dotfiles/
sudo -u johnc bash -c 'ls -lah $HOME/.dotfiles/'
sudo -u johnc bash -c 'cd $HOME/.dotfiles/arch && ./stowme.sh'
10 changes: 5 additions & 5 deletions .github/workflows/ci-fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
./install-dotstow.sh
- name: Simulate Stowing
run: |
mkdir -p /home/admin/.dotfiles
mkdir -p /home/admin/.local/state/dotstow
mkdir -p /home/johnc/.dotfiles
mkdir -p /home/johnc/.local/state/dotstow
ls -lah $PWD
cp -r $PWD/* /home/admin/.dotfiles/
sudo -u admin bash -c 'ls -lah $HOME/.dotfiles/'
sudo -u admin bash -c 'cd $HOME/.dotfiles/rhel && ./stowme.sh'
cp -r $PWD/* /home/johnc/.dotfiles/
sudo -u johnc bash -c 'ls -lah $HOME/.dotfiles/'
sudo -u johnc bash -c 'cd $HOME/.dotfiles/rhel && ./stowme.sh'
10 changes: 5 additions & 5 deletions arch/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ cp -f /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
rankmirrors -n 5 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist

# Create non root user
useradd admin -m
useradd johnc -m
# Using zsh shell
chsh -s /usr/bin/zsh admin
# Add admin to wheel group
usermod -aG wheel admin
chsh -s /usr/bin/zsh johnc
# Add johnc to wheel group
usermod -aG wheel johnc
# Allow wheel group sudo
echo '%wheel ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
if [ -v SKIP_SETTING_USER ]; then
echo 'Skipped setting password';
else
passwd admin
passwd johnc
fi
6 changes: 3 additions & 3 deletions arch/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
echo "[boot]
systemd=true
[user]
default=admin" | sudo tee /etc/wsl.conf
default=johnc" | sudo tee /etc/wsl.conf

# Setting default locale
sudo loadkeys us
Expand All @@ -18,7 +18,7 @@ sudo pacman -Syyu --noconfirm --noprogressbar
sudo pacman -S --noconfirm --noprogressbar base-devel git python3 zip unzip vi nano fakeroot openssh stow sqlite tmux
mkdir -p temp && cd temp/
# Reference: https://devicetests.com/running-commands-non-root-user-sudo
sudo -u admin bash -c '\
sudo -u johnc bash -c '\
git clone https://aur.archlinux.org/yay.git $HOME/yay
cd $HOME/yay && makepkg -si --noconfirm
'
Expand Down Expand Up @@ -59,7 +59,7 @@ if [ -v SKIP_INSTALL_PROGLANG ]; then
echo 'Skipped installing programming languages.';
else
sudo pacman -S --noconfirm --noprogressbar pyenv rbenv chaotic-aur/nvm
sudo -u admin bash -c '\
sudo -u johnc bash -c '\
yay -S ruby-build --noconfirm --noprogressbar
pyenv install 3.11.4 -v
pyenv global 3.11.4
Expand Down
10 changes: 5 additions & 5 deletions rhel/adduser.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/bin/sh

# Create non root user
sudo useradd admin -m
sudo useradd johnc -m
# Using zsh shell
sudo usermod -s /bin/zsh admin
# Add admin to wheel group
sudo usermod -aG wheel admin
sudo usermod -s /bin/zsh johnc
# Add johnc to wheel group
sudo usermod -aG wheel johnc
# Setting password
if [ -z "$SKIP_SETTING_USER" ]; then
sudo passwd admin
sudo passwd johnc
else
echo 'Skipped setting password';
fi
2 changes: 1 addition & 1 deletion rhel/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [ -v SKIP_INSTALL_PROGLANG ]; then
echo 'Skipped installing programming languages.';
else
sudo dnf install -y ruby-build
sudo -u admin bash -c '\
sudo -u johnc bash -c '\
pyenv install 3.11.4 -v
pyenv global 3.11.4
nvm install 18 --lts
Expand Down

0 comments on commit f065e9e

Please sign in to comment.