diff --git a/packer/ubuntu-jammy/files/.zshrc b/packer/ubuntu-jammy/files/.zshrc new file mode 100644 index 0000000..4eb8d56 --- /dev/null +++ b/packer/ubuntu-jammy/files/.zshrc @@ -0,0 +1,21 @@ +# Path to your Oh My Zsh installation. +export ZSH="$HOME/.oh-my-zsh" +export PATH=$PATH:$HOME/.local/bin + +# Set theme +ZSH_THEME="robbyrussell" + +# Plugins +plugins=(git ubuntu copypath copyfile dirhistory zsh-interactive-cd docker docker-compose opentofu zsh-history-substring-search zsh-autosuggestions zsh-syntax-highlighting you-should-use) + +source $ZSH/oh-my-zsh.sh + +# Set up Oh My Posh +eval "$(oh-my-posh init zsh --config https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/sonicboom_dark.omp.json)" + +# Custom aliases +alias dcd="docker compose down" +alias dcu="docker compose up -d" + +# Display system information +neofetch diff --git a/packer/ubuntu-jammy/ubuntu-jammy.pkr.hcl b/packer/ubuntu-jammy/ubuntu-jammy.pkr.hcl index ee624ed..4611b6a 100644 --- a/packer/ubuntu-jammy/ubuntu-jammy.pkr.hcl +++ b/packer/ubuntu-jammy/ubuntu-jammy.pkr.hcl @@ -94,27 +94,38 @@ build { ] } - provisioner "file" { source = "files/pve.cfg" destination = "/tmp/pve.cfg" } - provisioner "shell" { inline = [ "sudo cp /tmp/pve.cfg /etc/cloud/cloud.cfg.d/pve.cfg" ] } - # Install Commonly Used Things - add alias's - set git config + # Install commonly used things - add alias's - set git config provisioner "shell" { inline = [ - "sudo apt-get install -y ca-certificates curl gnupg lsb-release nfs-common qemu-guest-agent net-tools", + "sudo apt-get install -y ca-certificates curl gnupg lsb-release nfs-common qemu-guest-agent net-tools zsh neofetch fzf", + "sudo chsh -s $(which zsh) mafyuh", "curl -fsSL https://get.docker.com | sudo sh", - "echo \"alias dcu='docker compose up -d'\" >> ~/.bashrc", - "echo \"alias dcd='docker compose down'\" >> ~/.bashrc", + "sh -c \"$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\" --unattended", + "git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting", + "git clone https://github.com/zsh-users/zsh-autosuggestions.git $${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions", + "git clone https://github.com/zsh-users/zsh-history-substring-search.git $${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-history-substring-search", + "git clone https://github.com/MichaelAquilina/zsh-you-should-use.git $${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/you-should-use", + "mkdir -p /home/mafyuh/.local/bin", + "curl -fsSL https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -o /home/mafyuh/.local/bin/oh-my-posh", + "sudo chmod +x /home/mafyuh/.local/bin/oh-my-posh", "git config --global user.name \"Mafyuh\"", "git config --global user.email \"matt@mafyuh.com\"", "sudo apt-get -y update" ] } -} \ No newline at end of file + + provisioner "file" { + source = "files/.zshrc" + destination = "~/.zshrc" + } + +} diff --git a/terraform/ubu.tf b/terraform/ubu.tf index 94549ca..64172c3 100644 --- a/terraform/ubu.tf +++ b/terraform/ubu.tf @@ -64,8 +64,4 @@ resource "proxmox_virtual_environment_vm" "Ubu" { ] } -} - -output "vm_ipv4_address" { - value = proxmox_virtual_environment_vm.Ubu.ipv4_addresses[1][0] } \ No newline at end of file