Skip to content

Commit

Permalink
Fix some issues with the Ubuntu setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mmena1 committed Sep 16, 2024
1 parent 97a15d6 commit 935d0c3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions home/.chezmoidata/debian-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ packages:
- 'vim'
- 'xclip'
- 'curl'
- 'git'
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ setup_passwordless_sudo() {
local tmpfile=$(mktemp)
echo -e "Defaults:$LOGNAME !requiretty\n$LOGNAME ALL=(ALL) NOPASSWD: ALL" > "$tmpfile"
if sudo visudo -cf "$tmpfile" && sudo mv "$tmpfile" "$sudoers_d_dir/$LOGNAME"; then
# Change the owner back to root
pkexec chown root:root /etc/sudoers /etc/sudoers.d -R
echo "You can now run sudo commands without a password!"
else
echo "Error in sudoers file"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ install_asdf() {
if [[ ! -d ~/.asdf ]]; then
action "Cloning git repo..."
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0 || { echo "Failed to clone asdf repository"; exit 1; }
source ~/.asdf/asdf.sh
else
ok "asdf dir already exists, skipping cloning"
source ~/.asdf/asdf.sh
Expand Down
6 changes: 3 additions & 3 deletions home/.chezmoiscripts/run_once_after_03-docker-setup.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ install_docker() {
if ! _exists docker ; then
if prompt "Would you like to install Docker?"; then
action "Adding Docker official GPG key"
sudo apt-get install ca-certificates curl
sudo apt-get -qq install -y ca-certificates curl > /dev/null
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
Expand All @@ -18,9 +18,9 @@ install_docker() {
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
action "Updating apt packages with the new Docker repository"
sudo apt-get update
sudo apt-get -qq update > /dev/null
action "Installing Docker"
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo apt-get -qq install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin > /dev/null
else
ok "Skipping"
fi
Expand Down

0 comments on commit 935d0c3

Please sign in to comment.