~patrickhaussmann/dotfiles

f5aa20b46cf2c17966a4439466b227ba452f7086 — patrickhaussmann 6 months ago 0c91d2e
update vagrant vms
4 files changed, 78 insertions(+), 1 deletions(-)

M vm/default/Vagrantfile
A vm/ubuntu-focal/Vagrantfile
A vm/ubuntu-gui/Vagrantfile
A vm/win11/Vagrantfile
M vm/default/Vagrantfile => vm/default/Vagrantfile +4 -1
@@ 3,7 3,7 @@

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/lunar64"
  config.vm.network "private_network", ip: "192.168.47.62"
  config.vm.network "private_network", ip: "192.168.56.62"
  config.vm.hostname = "vagrant"
  config.vm.synced_folder ".", "/vagrant", disabled: true
  config.vm.synced_folder "/home/patrick", "/home/patrick", create: true


@@ 19,6 19,9 @@ Vagrant.configure("2") do |config|
    sudo -u vagrant git clone --quiet git@git.sr.ht:~patrickhaussmann/dotfiles
    cd dotfiles
    sudo -u vagrant bash install.sh
    
    bash install.sh

    shutdown -r now
SHELL
end

A vm/ubuntu-focal/Vagrantfile => vm/ubuntu-focal/Vagrantfile +27 -0
@@ 0,0 1,27 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/focal64"
  config.vm.network "private_network", ip: "192.168.56.67"
  config.vm.hostname = "vagrant"
  config.vm.synced_folder ".", "/vagrant", disabled: true
  config.vm.synced_folder "/home/patrick", "/home/patrick", create: true

  config.vm.provider "virtualbox" do |v|
    v.name = "vagrant"
    v.cpus = 2
    v.memory = 4096
  end

  config.vm.provision "file", source: "~/.ssh", destination: "$HOME/.ssh"
  config.vm.provision "shell", inline: <<-SHELL
    sudo -u vagrant git clone --quiet git@git.sr.ht:~patrickhaussmann/dotfiles
    cd dotfiles
    sudo -u vagrant bash install.sh
    
    bash install.sh

    shutdown -r now
SHELL
end

A vm/ubuntu-gui/Vagrantfile => vm/ubuntu-gui/Vagrantfile +39 -0
@@ 0,0 1,39 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/lunar64"
  config.vm.network "private_network", ip: "192.168.56.63"
  config.vm.hostname = "vagrant-ubuntu"

  config.vm.synced_folder ".", "/vagrant", disabled: true
  config.vm.synced_folder "/home/patrick", "/home/patrick", create: true

  config.vagrant.plugins = ["vagrant-vbguest"]
  # or install separately with: vagrant plugin install

  config.vm.provider "virtualbox" do |v|
    v.customize ['modifyvm', :id, '--clipboard', 'bidirectional']
    v.customize ['modifyvm', :id, '--draganddrop', 'bidirectional']
    v.gui = true
    v.name = "ubuntu-vagrant"
    v.cpus = 4
    v.memory = 6144
  end

  config.vm.provision "shell", inline: <<-SHELL
     [ -d dotfiles ] && exit 0
     mkdir git
     sudo -u vagrant cp /home/patrick/.ssh/* .ssh/
     sudo -u vagrant git clone --quiet git@git.sr.ht:~patrickhaussmann/dotfiles
     cd dotfiles
     sudo -u vagrant bash install.sh
     bash install.sh
     cd ..
     rm .ssh/*.orig
     apt install -y ubuntu-desktop
     "[daemon]\nAutomaticLoginEnable = true\nAutomaticLogin = vagrant\n\n[security]\n\n[xdmcp]\n\n[chooser]\n\n[debug]\n" | sudo tee /etc/gdm3/custom.conf
     apt purge -y gnome-initial-setup
     shutdown -r now
  SHELL
end

A vm/win11/Vagrantfile => vm/win11/Vagrantfile +8 -0
@@ 0,0 1,8 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "gusztavvargadr/windows-11"
  config.vm.network "private_network", ip: "192.168.47.65"
  config.vm.hostname = "vagrant-win11"
end