Compare commits
No commits in common. "f34dd35d5c115ec8febe5eb92ecb75005880a2d4" and "8228b78c4c5e2cbb0768bb72ea0f7a0addb52b0a" have entirely different histories.
f34dd35d5c
...
8228b78c4c
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1 @@
|
|||||||
.vagrant
|
.vagrant
|
||||||
.vagrant_settings
|
|
||||||
.vscode
|
|
||||||
|
13
LICENSE
13
LICENSE
@ -1,12 +1,5 @@
|
|||||||
Copyright (C) 2021, 2023 by Kris Lamoureux <kris@lamoureux.io>
|
Copyright (C) 2021 by Kris Lamoureux <kris@lamoureux.io>
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for
|
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
|
||||||
any purpose with or without fee is hereby granted.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
|
||||||
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
|
|
||||||
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
|
|
||||||
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
|
||||||
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
|
||||||
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@ -4,6 +4,6 @@ An Ansible project for provisioning and managing a Debian GNU/Linux productivity
|
|||||||
- The vagrant user's password is: `password`
|
- The vagrant user's password is: `password`
|
||||||
|
|
||||||
#### Copyrights and Licenses
|
#### Copyrights and Licenses
|
||||||
Copyright 2021, 2023 Kris Lamoureux
|
Copyright 2021 Kris Lamoureux
|
||||||
|
|
||||||
This project is licensed under the 0BSD license, a public-domain-equivalent license. Please refer to the LICENSE file contained in the repository.
|
This project is licensed under the 0BSD license, a public-domain-equivalent license. Please refer to the LICENSE file contained in the repository.
|
||||||
|
35
Vagrantfile
vendored
35
Vagrantfile
vendored
@ -1,43 +1,15 @@
|
|||||||
# -*- mode: ruby -*-
|
|
||||||
# vi: set ft=ruby :
|
|
||||||
|
|
||||||
# Load overrides
|
|
||||||
require 'yaml'
|
|
||||||
settings_path = '.vagrant_settings'
|
|
||||||
settings = {}
|
|
||||||
|
|
||||||
if File.exist?(settings_path)
|
|
||||||
settings = YAML.load_file(settings_path)
|
|
||||||
end
|
|
||||||
|
|
||||||
VAGRANT_CPUS = settings["VAGRANT_CPUS"] || 2
|
|
||||||
VAGRANT_MEMORY = settings["VAGRANT_MEMORY"] || 4096
|
|
||||||
VAGRANT_NETWORK_NAME = settings["VAGRANT_NETWORK_NAME"] || "vagrant-libvirt"
|
|
||||||
VAGRANT_NETWORK_ADDR = settings["VAGRANT_NETWORK_ADDR"] || "192.168.121.0/24"
|
|
||||||
|
|
||||||
# Vagrant
|
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
config.vm.box = "debian/bookworm64"
|
config.vm.box = "debian/bullseye64"
|
||||||
config.vm.network "private_network", type: "dhcp"
|
config.vm.network "private_network", type: "dhcp"
|
||||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||||
|
|
||||||
# Libvirt settings
|
|
||||||
config.vm.provider :libvirt do |libvirt|
|
|
||||||
libvirt.cpu_mode = "host-model"
|
|
||||||
libvirt.cpus = VAGRANT_CPUS
|
|
||||||
libvirt.memory = VAGRANT_MEMORY
|
|
||||||
libvirt.management_network_name = VAGRANT_NETWORK_NAME
|
|
||||||
libvirt.management_network_address = VAGRANT_NETWORK_ADDR
|
|
||||||
libvirt.nested = true
|
|
||||||
end
|
|
||||||
|
|
||||||
# Boot with a GUI in VirtualBox
|
# Boot with a GUI in VirtualBox
|
||||||
config.vm.provider "virtualbox" do |vbox|
|
config.vm.provider "virtualbox" do |vbox|
|
||||||
vbox.customize ["modifyvm", :id, "--vram", "128",
|
vbox.customize ["modifyvm", :id, "--vram", "128",
|
||||||
"--graphicscontroller", "vboxvga",
|
"--graphicscontroller", "vboxvga",
|
||||||
"--accelerate3d", "on"]
|
"--accelerate3d", "on"]
|
||||||
vbox.memory = VAGRANT_MEMORY
|
vbox.memory = 4096
|
||||||
vbox.cpus = VAGRANT_CPUS
|
vbox.cpus = 2
|
||||||
vbox.gui = true
|
vbox.gui = true
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -46,6 +18,5 @@ Vagrant.configure("2") do |config|
|
|||||||
ENV['ANSIBLE_ROLES_PATH'] = File.dirname(__FILE__) + "/roles"
|
ENV['ANSIBLE_ROLES_PATH'] = File.dirname(__FILE__) + "/roles"
|
||||||
ansible.compatibility_mode = "2.0"
|
ansible.compatibility_mode = "2.0"
|
||||||
ansible.playbook = "site-vagrant.yml"
|
ansible.playbook = "site-vagrant.yml"
|
||||||
ansible.raw_arguments = ["--diff"]
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,35 +1,11 @@
|
|||||||
# Settings convenient for development in vagrant
|
# Settings convenient for development in vagrant
|
||||||
development: true
|
development: true
|
||||||
|
|
||||||
packages:
|
|
||||||
# GUI applications
|
|
||||||
- firefox-esr
|
|
||||||
- terminator
|
|
||||||
- remmina
|
|
||||||
|
|
||||||
# Virtualization
|
|
||||||
- qemu-system
|
|
||||||
- libvirt-daemon-system
|
|
||||||
- vagrant-libvirt
|
|
||||||
- virt-manager
|
|
||||||
|
|
||||||
# Configuration management
|
|
||||||
- ansible
|
|
||||||
|
|
||||||
users:
|
users:
|
||||||
- name: vagrant
|
- name: vagrant
|
||||||
groups:
|
|
||||||
- libvirt
|
|
||||||
|
|
||||||
#manage_gui: true
|
favorites:
|
||||||
|
- firefox-esr.desktop
|
||||||
#darkmode: true
|
- terminator.desktop
|
||||||
#favorites:
|
- org.kde.dolphin.desktop
|
||||||
# - firefox-esr.desktop
|
- org.remmina.Remmina.desktop
|
||||||
# - terminator.desktop
|
|
||||||
# - org.kde.dolphin.desktop
|
|
||||||
# - org.remmina.Remmina.desktop
|
|
||||||
|
|
||||||
#pinned:
|
|
||||||
# - firefox-esr.desktop
|
|
||||||
# - terminator.desktop
|
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
darkmode: false
|
|
||||||
homedir: "/home/{{ item.name }}"
|
homedir: "/home/{{ item.name }}"
|
||||||
|
|
||||||
# Follows homelab package list:
|
# Follows homelab package list:
|
||||||
# https://git.krislamo.org/kris/homelab/src/branch/main/roles/base/defaults/main.yml#L6
|
# https://github.com/krislamo/moxie/blob/master/roles/base/defaults/main.yml
|
||||||
homelab_packages:
|
moxie_packages:
|
||||||
- apache2-utils
|
|
||||||
- cryptsetup
|
- cryptsetup
|
||||||
- curl
|
- curl
|
||||||
- dnsutils
|
- dnsutils
|
||||||
@ -20,6 +18,9 @@ homelab_packages:
|
|||||||
- vim
|
- vim
|
||||||
- wget
|
- wget
|
||||||
|
|
||||||
manage_gui: false
|
|
||||||
packages:
|
packages:
|
||||||
- "{{ homelab_packages }}"
|
- "{{ moxie_packages }}"
|
||||||
|
- firefox-esr
|
||||||
|
- meld
|
||||||
|
- remmina
|
||||||
|
- terminator
|
||||||
|
@ -1,6 +1,24 @@
|
|||||||
- name: Set vagrant user password
|
- name: Set vagrant user password
|
||||||
ansible.builtin.user:
|
user:
|
||||||
name: vagrant
|
name: vagrant
|
||||||
password: "$6$xu0I8bbf.Nva7uCo$OHz5/64u0SjHa1jn0EwCLSNw7Zoj5ejhL\
|
password: "$6$xu0I8bbf.Nva7uCo$OHz5/64u0SjHa1jn0EwCLSNw7Zoj5ejhL\
|
||||||
6NtaXYY6zlC0CQa0J4kZIxAp2Ls4lMdLmuo7oMQX/vlDucR9BbcA."
|
6NtaXYY6zlC0CQa0J4kZIxAp2Ls4lMdLmuo7oMQX/vlDucR9BbcA."
|
||||||
|
|
||||||
|
- name: Install fasttrack archive keyring
|
||||||
|
apt:
|
||||||
|
name: fasttrack-archive-keyring
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
|
||||||
|
- name: Enable fasttrack
|
||||||
|
copy:
|
||||||
|
dest: /etc/apt/sources.list.d/fasttrack.list
|
||||||
|
content: |
|
||||||
|
deb https://fasttrack.debian.net/debian-fasttrack/ bullseye-fasttrack main contrib
|
||||||
|
deb https://fasttrack.debian.net/debian-fasttrack/ bullseye-backports-staging main contrib
|
||||||
|
|
||||||
|
- name: Install guest additions
|
||||||
|
apt:
|
||||||
|
name: virtualbox-guest-x11
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
- name: Install KDE
|
- name: Install KDE
|
||||||
ansible.builtin.apt:
|
apt:
|
||||||
name: kde-standard
|
name: kde-standard
|
||||||
state: present
|
state: present
|
||||||
update_cache: true
|
update_cache: true
|
||||||
@ -11,7 +11,6 @@
|
|||||||
owner: "{{ item.name }}"
|
owner: "{{ item.name }}"
|
||||||
group: "{{ item.name }}"
|
group: "{{ item.name }}"
|
||||||
loop: "{{ users }}"
|
loop: "{{ users }}"
|
||||||
when: manage_gui
|
|
||||||
|
|
||||||
- name: Enable KDE dark theme
|
- name: Enable KDE dark theme
|
||||||
copy:
|
copy:
|
||||||
@ -23,26 +22,20 @@
|
|||||||
lookandfeeltool -a $(lookandfeeltool --list | grep dark)
|
lookandfeeltool -a $(lookandfeeltool --list | grep dark)
|
||||||
fi
|
fi
|
||||||
loop: "{{ users }}"
|
loop: "{{ users }}"
|
||||||
when: manage_gui and darkmode
|
|
||||||
|
- name: Install packages
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
loop: "{{ packages }}"
|
||||||
|
|
||||||
- name: Install sqlite3
|
- name: Install sqlite3
|
||||||
ansible.builtin.apt:
|
apt:
|
||||||
name: sqlite3
|
name: sqlite3
|
||||||
state: present
|
state: present
|
||||||
when: manage_gui and favorites is defined or pinned is defined
|
|
||||||
|
|
||||||
- name: Change favorites menu
|
- name: Change favorites menu
|
||||||
ansible.builtin.template:
|
template:
|
||||||
src: favorites.sh.j2
|
src: favorites.sh.j2
|
||||||
dest: "{{ homedir }}/.config/autostart-scripts/favorites.sh"
|
dest: "{{ homedir }}/.config/autostart-scripts/favorites.sh"
|
||||||
mode: a+x
|
mode: a+x
|
||||||
loop: "{{ users }}"
|
loop: "{{ users }}"
|
||||||
when: manage_gui and favorites is defined
|
|
||||||
|
|
||||||
- name: Change task manager pinned apps
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: pinnedapps.sh.j2
|
|
||||||
dest: "{{ homedir }}/.config/autostart-scripts/pinnedapps.sh"
|
|
||||||
mode: a+x
|
|
||||||
loop: "{{ users }}"
|
|
||||||
when: manage_gui and pinned is defined
|
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
- name: Import development vagrant tasks
|
- import_tasks: development.yml
|
||||||
ansible.builtin.import_tasks: development.yml
|
|
||||||
tags: development
|
tags: development
|
||||||
when: development
|
when: development
|
||||||
|
|
||||||
- name: Import system tasks
|
- import_tasks: gui.yml
|
||||||
ansible.builtin.import_tasks: system.yml
|
|
||||||
tags: system
|
|
||||||
|
|
||||||
- name: Import GUI tasks
|
|
||||||
ansible.builtin.import_tasks: gui.yml
|
|
||||||
tags: gui
|
tags: gui
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
- name: Install software
|
|
||||||
ansible.builtin.apt:
|
|
||||||
name: "{{ packages }}"
|
|
||||||
state: present
|
|
||||||
update_cache: true
|
|
||||||
|
|
||||||
- name: Create system users
|
|
||||||
ansible.builtin.user:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
state: present
|
|
||||||
groups: "{{ item.groups }}"
|
|
||||||
append: yes
|
|
||||||
shell: "{{ item.shell | default('/bin/bash') }}"
|
|
||||||
create_home: "{{ item.home | default(false) }}"
|
|
||||||
loop: "{{ users }}"
|
|
||||||
when: users is defined
|
|
@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
PINNED="{% for item in pinned %}{{ item }}{{ ',' if not loop.last else '' }}{% endfor %}"
|
|
||||||
FILE="~/.config/plasma-org.kde.plasma.desktop-appletsrc"
|
|
||||||
HEADER="[Containments][2][Applets][5][Configuration][General]"
|
|
||||||
SECTIONUNDER="[Containments][2][Applets][6]"
|
|
||||||
if [ -f "$FILE" ]; then
|
|
||||||
if ! grep -q "$PINNED" "$FILE"; then
|
|
||||||
sed -i "/^$HEADER\nlaunchers=.*/i\n\n$SECTIONUNDER" "$FILE"
|
|
||||||
fi
|
|
||||||
fi
|
|
Loading…
Reference in New Issue
Block a user