mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
remove submodules and add to main project
This commit is contained in:
parent
ceeb2ec438
commit
3ba0f3c1fa
7
.gitmodules
vendored
7
.gitmodules
vendored
@ -1,7 +0,0 @@
|
||||
[submodule "provision/void"]
|
||||
path = provision/void
|
||||
url = https://github.com/starr-dusT/provision-void.git
|
||||
[submodule "provision/fedora"]
|
||||
path = provision/fedora
|
||||
url = https://github.com/starr-dusT/provision-fedora.git
|
||||
branch = master
|
@ -1 +0,0 @@
|
||||
Subproject commit 688d5d33ca6f0d0aa975d30b65900a0a357c7400
|
188
provision/fedora/additional-setup.md
Normal file
188
provision/fedora/additional-setup.md
Normal file
@ -0,0 +1,188 @@
|
||||
# Additional Setup
|
||||
|
||||
The following documents some Fedora setup that wasn't automated with ansible.
|
||||
|
||||
## Snapper
|
||||
|
||||
Snapper is used to create snapshots with the BTRFS filesystem for root and home
|
||||
directories. I'd like to make these snapshots available at grub with
|
||||
[grub-btrfs](https://github.com/Antynea/grub-btrfs), but I've found that
|
||||
akmod-nvidia breaks it. Snapper is setup with:
|
||||
|
||||
```bash
|
||||
sudo btrfs filesystem label / *FTL ship name*
|
||||
|
||||
# Make /var/log subvolume
|
||||
sudo mv -v /var/log /var/log-old
|
||||
sudo btrfs subvolume create /var/log
|
||||
sudo cp -arv /var/log-old/. /var/log/
|
||||
sudo restorecon -RFv /var/log
|
||||
sudo rm -rvf /var/log-old
|
||||
|
||||
# Add /var/log to fstab
|
||||
sudo vi /etc/fstab
|
||||
# UUID=<drive uuid> /var/log btrfs subvol=var/log,compress=zstd:1 0 0
|
||||
sudo systemctl daemon-reload
|
||||
sudo mount -va
|
||||
|
||||
# Create snapper configs
|
||||
sudo snapper -c root create-config /
|
||||
sudo snapper -c home create-config /home
|
||||
|
||||
# Allow users to perform snapshots
|
||||
sudo snapper -c root set-config ALLOW_USERS=$USER SYNC_ACL=yes
|
||||
sudo snapper -c home set-config ALLOW_USERS=$USER SYNC_ACL=yes
|
||||
sudo chown -R :$USER /.snapshots
|
||||
sudo chown -R :$USER /home/.snapshots
|
||||
|
||||
# Add / and /home to fstab
|
||||
sudo vi /etc/fstab
|
||||
# UUID=<drive uuid> /.snapshots btrfs subvol=.snapshots,compress=zstd:1 0 0
|
||||
# UUID=<drive uuid> /home/.snapshots btrfs subvol=home/.snapshots,compress=zstd:1 0 0
|
||||
sudo systemctl daemon-reload
|
||||
sudo mount -va
|
||||
|
||||
# Show resulting subvolume structure
|
||||
sudo btrfs subvolume list /
|
||||
|
||||
# Enable and start snapper timeline and cleanup services
|
||||
sudo systemctl enable snapper-timeline.timer
|
||||
sudo systemctl start snapper-timeline.timer
|
||||
sudo systemctl enable snapper-cleanup.timer
|
||||
sudo systemctl start snapper-cleanup.timer
|
||||
```
|
||||
|
||||
## Wireguard Client
|
||||
|
||||
Wireguard is nice for a home vpn and [pivpn](https://pivpn.io/) makes it easy.
|
||||
|
||||
1. Create client on server and copy resulting `.conf` file to local machine
|
||||
2. Import to networkmanager with:
|
||||
```bash
|
||||
nmcli connection import type wireguard file <conf file from pivpn>
|
||||
```
|
||||
3. Use `nm-connection-editor` to disable automatic connection
|
||||
|
||||
## Mount network drives
|
||||
|
||||
I find fstab messing about more troubule than it is worth. Credentials are
|
||||
stored in ~/.smb. Mount network drives when needed with the following command:
|
||||
|
||||
```bash
|
||||
linux-mount-<network drive name>
|
||||
```
|
||||
|
||||
## Taskopen for taskwarrior
|
||||
|
||||
[taskopen](https://github.com/jschlatow/taskopeni) is easier to install
|
||||
manually at this point since it isn't packaged and uses nim. Might get this
|
||||
automated in the future.
|
||||
|
||||
```bash
|
||||
curl https://nim-lang.org/choosenim/init.sh -sSf | sh # install nim
|
||||
git clone https://github.com/jschlatow/taskopen.git
|
||||
cd taskopen
|
||||
make PREFIX=/usr
|
||||
sudo make PREFIX=/usr install
|
||||
```
|
||||
|
||||
## Syncthing
|
||||
|
||||
Syncthing is used to sync folders between various computers and android. The
|
||||
ansible script should setup and run the service, but shares must be setup
|
||||
via the web gui. Currently four shares exists:
|
||||
- `.warrior` - `.task` and `.timewarrior` folders to sync taskwarrior tasks.
|
||||
These two folders are symlinked to the home folder where taskwarrior/timewarrior
|
||||
expects them.
|
||||
- `warrior` - contains text files associated with taskwarrior (mostly from
|
||||
taskopen).
|
||||
- `phone photos` - personal photos synched from android.
|
||||
- `phone screenshots` - personal screenshots synced from android.
|
||||
- `ssh_keys` - contains ssh keys for git remotes (~/.ssh/keys)
|
||||
- `vimwiki` - contains text files associate with my personal vimwiki.
|
||||
|
||||
## Lxappearance
|
||||
|
||||
My GTK theme is pulled down by chezmoi, but isn't active by default. This can
|
||||
be fixed with the lxappearance gui (for X sessions).
|
||||
|
||||
## Git SSH for personal and work
|
||||
|
||||
- ~/.gitconfig - personal github configuration.
|
||||
- ~/devel/work/.gitconfig - work gitlab configuration.
|
||||
|
||||
Gitconfig files for SSH git push/pull are automaitcally placed. The only
|
||||
additional configuration required is the transfer of SSH keys (see Syncthing
|
||||
section).
|
||||
|
||||
## Firefox
|
||||
|
||||
Transfer the `.mozilla` folder from install-to-install to maintain Firefox
|
||||
settings and configurations.
|
||||
|
||||
## Dracula colorscheme for gnome terminal
|
||||
|
||||
[Dracula](https://draculatheme.com/gnome-terminal) is used for gnome-terminal.
|
||||
Run the following commands to install:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/dracula/gnome-terminal
|
||||
cd gnome-terminal
|
||||
./install.sh
|
||||
```
|
||||
|
||||
## Bluetooth Audio
|
||||
|
||||
In addition to the `pipewire-codec-aptx` package being required (installed
|
||||
with ansible) you need to set `ControllerMode = bredr` in
|
||||
`/etc/bluetooth/main.conf` to get bluetooth to work properly with audio devices.
|
||||
|
||||
## Linux-tkg kernel
|
||||
|
||||
The [linux-tkg](https://github.com/Frogging-Family/linux-tkg) kernel provides
|
||||
a more responsive desktop. Install with the following:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Frogging-Family/linux-tkg.git
|
||||
cd linux-tkg
|
||||
```
|
||||
|
||||
Set `CONFIG_EFI_HANDOVER_PROTOCOL` to `y` in
|
||||
`linux-tkg-config/<kernel-version>/config.x86_64`.
|
||||
|
||||
```bash
|
||||
./install.sh install
|
||||
sudo dnf install akmod-nvidia
|
||||
```
|
||||
|
||||
Reboot into new kernel.
|
||||
|
||||
## Single GPU Passthrough to windows
|
||||
|
||||
I use a windows virtual machine with gpu passthrough of the few games that
|
||||
won't work on linux, Zwift, and Fusion360. [This](https://github.com/ilayna/Single-GPU-passthrough-amd-nvidia)
|
||||
has scripts that make that process relatively easy and [this wiki](https://gitlab.com/risingprismtv/single-gpu-passthrough/-/wikis/home)
|
||||
provides good information on setting up the virtual machine in virt-manager.
|
||||
The `patch.rom` required for my GPU is included in my repo. The virt-manager
|
||||
setup should usually be avoided by transfering the VM between machines:
|
||||
|
||||
1. Copy the VM's disks from `/var/lib/libvirt/images` on src host to the same dir on destination host
|
||||
2. On the source host run `virsh dumpxml VMNAME > domxml.xml` and copy this xml to the destination host
|
||||
3. On the destination host run `virsh define domxml.xml`
|
||||
|
||||
## Google earth pro
|
||||
|
||||
[Google earth](https://www.google.com/earth/versions/) is nice for visualizing
|
||||
my hikes and checking out snow levels. Download the RPM and install with yum.
|
||||
|
||||
## Emacs
|
||||
|
||||
```bash
|
||||
git clone git://git.sv.gnu.org/emacs.git
|
||||
sudo dnf install autoconf texinfo gtk3-devel libgccjit-devel gnutls-devel ncurses-devel jansson jansson-devel
|
||||
cd emacs
|
||||
./autogen.sh
|
||||
./configure --with-native-compilation --with-json --with-pgtk
|
||||
make -j16
|
||||
sudo make install
|
||||
```
|
1
provision/fedora/ansible/hosts
Normal file
1
provision/fedora/ansible/hosts
Normal file
@ -0,0 +1 @@
|
||||
local ansible_connection=local ansible_python_interpreter=/usr/bin/python3
|
8
provision/fedora/ansible/requirements.yml
Normal file
8
provision/fedora/ansible/requirements.yml
Normal file
@ -0,0 +1,8 @@
|
||||
# Ansible Galaxy Roles
|
||||
roles:
|
||||
- src: https://github.com/starr-dusT/ansible-role-customize-gnome
|
||||
- src: https://github.com/starr-dusT/ansible-rustup
|
||||
collections:
|
||||
- name: community.general
|
||||
version: 6.0.1
|
||||
source: https://galaxy.ansible.com
|
13
provision/fedora/ansible/setup.yml
Normal file
13
provision/fedora/ansible/setup.yml
Normal file
@ -0,0 +1,13 @@
|
||||
- name: Ansible playbook to setup fedora linux
|
||||
hosts: all
|
||||
|
||||
vars_files:
|
||||
- ../../../home/.chezmoidata.yaml
|
||||
|
||||
tasks:
|
||||
- import_tasks: tasks/system/_main.yml
|
||||
- import_tasks: tasks/terminal/_main.yml
|
||||
- import_tasks: tasks/development/_main.yml
|
||||
- import_tasks: tasks/gaming/_main.yml
|
||||
- import_tasks: tasks/engineering/_main.yml
|
||||
- import_tasks: tasks/desktop/_main.yml
|
7
provision/fedora/ansible/tasks/desktop/_main.yml
Normal file
7
provision/fedora/ansible/tasks/desktop/_main.yml
Normal file
@ -0,0 +1,7 @@
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
||||
- import_tasks: configs.yml
|
||||
tags: ["configs"]
|
||||
- import_tasks: gnome-settings/_main.yml
|
||||
tags: ["configs"]
|
||||
when: desktop == "gnome"
|
41
provision/fedora/ansible/tasks/desktop/configs.yml
Normal file
41
provision/fedora/ansible/tasks/desktop/configs.yml
Normal file
@ -0,0 +1,41 @@
|
||||
- name: Set desktop files to hide
|
||||
include_tasks: ../include/hide-desktop.yml
|
||||
loop:
|
||||
- /usr/share/applications/wine-winhelp.desktop
|
||||
- /usr/share/applications/wine-mime-msi.desktop
|
||||
- /usr/share/applications/wine-notepad.desktop
|
||||
- /usr/share/applications/wine-oleview.desktop
|
||||
- /usr/share/applications/wine-regedit.desktop
|
||||
- /usr/share/applications/wine-uninstaller.desktop
|
||||
- /usr/share/applications/wine-wineboot.desktop
|
||||
- /usr/share/applications/wine-winecfg.desktop
|
||||
- /usr/share/applications/wine-winefile.desktop
|
||||
- /usr/share/applications/wine-winemine.desktop
|
||||
- /usr/share/applications/wine-wordpad.desktop
|
||||
- /usr/share/applications/vifm.desktop
|
||||
- /usr/share/applications/dosbox-staging.desktop
|
||||
- /usr/share/applications/nvim.desktop
|
||||
- /usr/share/applications/syncthing-start.desktop
|
||||
- /usr/share/applications/syncthing-ui.desktop
|
||||
- /usr/share/applications/cgnscalc.desktop
|
||||
- /usr/share/applications/cgnsnodes.desktop
|
||||
- /usr/share/applications/cgnsplot.desktop
|
||||
- /usr/share/applications/cgnsview.desktop
|
||||
- /usr/share/applications/qt5-assistant.desktop
|
||||
- /usr/share/applications/opencascade-draw.desktop
|
||||
- /usr/share/applications/unitconv.desktop
|
||||
|
||||
- name: Uninstall desktop bloat
|
||||
dnf:
|
||||
name:
|
||||
- yelp
|
||||
- gnome-boxes
|
||||
- rhythmbox
|
||||
- gnome-photos
|
||||
- totem
|
||||
- gnome-text-editor
|
||||
- cheese
|
||||
- gnome-tour
|
||||
- gnome-maps
|
||||
state: absent
|
||||
become: true
|
@ -0,0 +1,17 @@
|
||||
- name: Set custom gnome binding {{ index }}
|
||||
dconf:
|
||||
key: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom{{ index }}/binding"
|
||||
value: "{{ item.bind }}"
|
||||
state: present
|
||||
|
||||
- name: Set custom gnome command {{ index }}
|
||||
dconf:
|
||||
key: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom{{ index }}/command"
|
||||
value: "{{ item.command }}"
|
||||
state: present
|
||||
|
||||
- name: Set custom gnome name {{ index }}
|
||||
dconf:
|
||||
key: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom{{ index }}/name"
|
||||
value: "{{ index }}"
|
||||
state: present
|
@ -0,0 +1,6 @@
|
||||
- import_tasks: extensions.yml
|
||||
tags: ["gnome-extensions"]
|
||||
- import_tasks: keybinds.yml
|
||||
tags: ["configs"]
|
||||
- import_tasks: window-management.yml
|
||||
tags: ["configs"]
|
@ -0,0 +1,11 @@
|
||||
- name: Install gnome extensions
|
||||
include_role:
|
||||
name: ansible-role-customize-gnome
|
||||
vars:
|
||||
# For now extensions aren't enabled (https://github.com/PeterMosmans/ansible-role-customize-gnome/issues/25)
|
||||
gnome_extensions:
|
||||
- id: 779 # https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator
|
||||
- id: 4362 # https://github.com/Noobsai/fullscreen-avoider
|
||||
- id: 1460 # https://github.com/corecoding/Vitals
|
||||
- id: 7 # https://gitlab.gnome.org/GNOME/gnome-shell-extensions
|
||||
gnome_user: "{{ user }}"
|
@ -0,0 +1,62 @@
|
||||
- name: Unset particular default gnome keybinds
|
||||
dconf:
|
||||
key: "{{ item }}"
|
||||
value: [""]
|
||||
state: present
|
||||
loop:
|
||||
- "/org/gnome/shell/keybindings/switch-to-application-1"
|
||||
- "/org/gnome/shell/keybindings/switch-to-application-2"
|
||||
- "/org/gnome/shell/keybindings/switch-to-application-3"
|
||||
- "/org/gnome/shell/keybindings/switch-to-application-4"
|
||||
- "/org/gnome/shell/keybindings/switch-to-application-5"
|
||||
- "/org/gnome/desktop/wm/keybindings/switch-input-source"
|
||||
- "/org/gnome/desktop/wm/keybindings/switch-input-source-backwards"
|
||||
- "/org/gnome/settings-daemon/plugins/media-keys/screensaver"
|
||||
- "/org/gnome/desktop/wm/keybindings/switch-applications"
|
||||
- "/org/gnome/desktop/wm/keybindings/switch-applications-backward"
|
||||
- "/org/gnome/desktop/wm/keybindings/switch-windows"
|
||||
- "/org/gnome/desktop/wm/keybindings/switch-windows-backward"
|
||||
|
||||
- name: Change existing gnome keybinds
|
||||
dconf:
|
||||
key: "{{ item.key }}"
|
||||
value: "{{ item.value }}"
|
||||
state: present
|
||||
loop:
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/switch-to-workspace-1", value: ["<Super>1"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/switch-to-workspace-2", value: ["<Super>2"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/switch-to-workspace-3", value: ["<Super>3"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/switch-to-workspace-4", value: ["<Super>4"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/switch-to-workspace-5", value: ["<Super>5"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/move-to-workspace-1", value: ["<Super><Shift>1"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/move-to-workspace-2", value: ["<Super><Shift>2"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/move-to-workspace-3", value: ["<Super><Shift>3"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/move-to-workspace-4", value: ["<Super><Shift>4"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/move-to-workspace-5", value: ["<Super><Shift>5"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/minimize", value: ["<Super>Space"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/toggle-fullscreen", value: ["<Super>F"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/close", value: ["<Super>Q"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/maximize-horizontally", value: ["<Super><Shift>H"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/maximize-vertically", value: ["<Super><Shift>V"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/move-to-center", value: ["<Super>C"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/switch-windows", value: ["<Super>Tab"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/switch-windows-backward", value: ["<Super><Shift>Tab"]}
|
||||
- {key: "/org/gnome/settings-daemon/plugins/media-keys/screensaver", value: ["<Super><Shift>L"]}
|
||||
|
||||
- name: Set custom gnome keybinds
|
||||
include_tasks: _custom-bind.yml
|
||||
loop:
|
||||
- {command: "'gnome-terminal'", bind: "'<Super>Return'"}
|
||||
- {command: "'firefox'", bind: "'<Super><Shift>B'"}
|
||||
- {command: "'code'", bind: "'<Super><Shift>V'"}
|
||||
loop_control:
|
||||
index_var: index
|
||||
|
||||
# Gnome requires an array of strings with the custom keybinds
|
||||
# this must match the number of keybinds defined above...
|
||||
- name: Set custom-keybinds array
|
||||
dconf:
|
||||
key: /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings
|
||||
value: "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/',
|
||||
'/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/',
|
||||
'/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/']"
|
@ -0,0 +1,10 @@
|
||||
|
||||
- name: Set Static workspaces
|
||||
dconf:
|
||||
key: "/org/gnome/mutter/dynamic-workspaces"
|
||||
value: "false"
|
||||
|
||||
- name: Set Number of workspaces
|
||||
dconf:
|
||||
key: "/org/gnome/desktop/wm/preferences/num-workspaces"
|
||||
value: "5"
|
25
provision/fedora/ansible/tasks/desktop/packages.yml
Normal file
25
provision/fedora/ansible/tasks/desktop/packages.yml
Normal file
@ -0,0 +1,25 @@
|
||||
- name: Install desktop fedora packages
|
||||
dnf:
|
||||
name:
|
||||
- mpv # Video player based on MPlayer/mplayer2
|
||||
- ffmpeg # Decoding, encoding and streaming software
|
||||
- akmod-nvidia # NVIDIA drivers for linux - Libraries and Utilities
|
||||
- firefox # Mozilla Firefox web browser
|
||||
#- nerd-fonts # Iconic font aggregator, collection and patcher
|
||||
- gnome-tweaks
|
||||
- evolution
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Install desktop flatpaks
|
||||
flatpak:
|
||||
name:
|
||||
- com.discordapp.Discord # VoIP and instant messaging social platform
|
||||
- org.gimp.GIMP # Create images and edit photographs
|
||||
- org.inkscape.Inkscape # Vector Graphics Editor
|
||||
- com.github.tchx84.Flatseal # Manage Flatpak permissions
|
||||
- com.mattjakeman.ExtensionManager # A utility for browsing and installing GNOME Shell Extensions
|
||||
- org.kde.kdenlive
|
||||
- com.bitwarden.desktop
|
||||
state: present
|
||||
become: true
|
4
provision/fedora/ansible/tasks/development/_main.yml
Normal file
4
provision/fedora/ansible/tasks/development/_main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
||||
- import_tasks: configs.yml
|
||||
tags: ["configs"]
|
5
provision/fedora/ansible/tasks/development/configs.yml
Normal file
5
provision/fedora/ansible/tasks/development/configs.yml
Normal file
@ -0,0 +1,5 @@
|
||||
- name: Setup nvm
|
||||
tags: ["once"]
|
||||
shell: >
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
|
||||
creates=/home/{{ user }}/.nvm/nvm.sh
|
43
provision/fedora/ansible/tasks/development/packages.yml
Normal file
43
provision/fedora/ansible/tasks/development/packages.yml
Normal file
@ -0,0 +1,43 @@
|
||||
- name: Enable lazygit copr repo
|
||||
tags: ["once"]
|
||||
community.general.copr:
|
||||
name: atim/lazygit
|
||||
state: enabled
|
||||
become: true
|
||||
|
||||
- name: Install development void packages
|
||||
dnf:
|
||||
name:
|
||||
- python3 # Python programming language (3.11 series)
|
||||
- python3.9
|
||||
- python3-pip # A tool for installing and managing Python3 packages
|
||||
- python3-ipython
|
||||
- ripgrep # Fast search tool inspired by ag and grep
|
||||
- fd-find # Simple, fast and user-friendly alternative to find
|
||||
- lazygit # Simple terminal UI for git commands
|
||||
- pipenv # Python Development Workflow for Humans
|
||||
- python3-devel # Python programming language (3.11 series) - development files
|
||||
- rubygems
|
||||
- perl
|
||||
- cloc
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Install tmuxinator gem package
|
||||
gem:
|
||||
name: tmuxinator # Create and manage complex tmux sessions easily
|
||||
state: latest
|
||||
|
||||
- name: Install development python packages
|
||||
ansible.builtin.pip:
|
||||
name:
|
||||
- ansible-lint # Command-line tool for linting playbooks, roles and collections
|
||||
- pyright
|
||||
|
||||
- name: Install development flatpaks
|
||||
flatpak:
|
||||
name:
|
||||
- com.vscodium.codium # Free/Libre Open Source Software Binaries of VS Code
|
||||
- com.github.GradienceTeam.Gradience
|
||||
state: present
|
||||
become: true
|
2
provision/fedora/ansible/tasks/engineering/_main.yml
Normal file
2
provision/fedora/ansible/tasks/engineering/_main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
9
provision/fedora/ansible/tasks/engineering/packages.yml
Normal file
9
provision/fedora/ansible/tasks/engineering/packages.yml
Normal file
@ -0,0 +1,9 @@
|
||||
- name: Install engineering fedora packages
|
||||
dnf:
|
||||
name:
|
||||
- freecad # General purpose 3D CAD modeler
|
||||
- gqrx
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- include_tasks: superslicer.yml # PrusaSlicer fork (which is a slic3r fork)
|
@ -0,0 +1,6 @@
|
||||
- name: Install SuperSlicer
|
||||
include_tasks: ../include/download-github-bin.yml
|
||||
loop:
|
||||
- user: supermerill
|
||||
repo: SuperSlicer
|
||||
regex: "SuperSlicer-ubuntu_18.04-[0-9]"
|
2
provision/fedora/ansible/tasks/gaming/_main.yml
Normal file
2
provision/fedora/ansible/tasks/gaming/_main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
9
provision/fedora/ansible/tasks/gaming/packages.yml
Normal file
9
provision/fedora/ansible/tasks/gaming/packages.yml
Normal file
@ -0,0 +1,9 @@
|
||||
- name: Install gaming fedora packages
|
||||
dnf:
|
||||
name:
|
||||
- steam # Launcher for the Steam software distribution service
|
||||
- lutris # Video game preservation platform
|
||||
- gamemode # Optimize system performance for games on demand
|
||||
- wine # A compatibility layer for windows applications
|
||||
state: present
|
||||
become: true
|
@ -0,0 +1,16 @@
|
||||
- name: Get {{ item.repo }} release information
|
||||
uri:
|
||||
url: https://api.github.com/repos/{{ item.user }}/{{ item.repo }}/releases/latest
|
||||
return_content: true
|
||||
register: repo_latest
|
||||
|
||||
- name: Install archived {{ item.repo }} - {{ repo_latest.json.tag_name }}
|
||||
loop: "{{ repo_latest.json.assets }}"
|
||||
when: "asset.name is regex(item.regex)"
|
||||
unarchive:
|
||||
src: "{{ asset.browser_download_url }}"
|
||||
dest: /usr/local/bin
|
||||
remote_src: true
|
||||
loop_control:
|
||||
loop_var: asset
|
||||
become: true
|
@ -0,0 +1,16 @@
|
||||
- name: Get {{ item.repo }} release information
|
||||
uri:
|
||||
url: https://api.github.com/repos/{{ item.user }}/{{ item.repo }}/releases/latest
|
||||
return_content: true
|
||||
register: repo_latest
|
||||
|
||||
- name: Install un-archived {{ item.repo }} - {{ repo_latest.json.tag_name }}
|
||||
loop: "{{ repo_latest.json.assets }}"
|
||||
when: "asset.name is regex(item.regex)"
|
||||
get_url:
|
||||
url: "{{ asset.browser_download_url }}"
|
||||
dest: /usr/local/bin/{{ item.repo }}
|
||||
mode: 0775
|
||||
loop_control:
|
||||
loop_var: asset
|
||||
become: true
|
18
provision/fedora/ansible/tasks/include/hide-desktop.yml
Normal file
18
provision/fedora/ansible/tasks/include/hide-desktop.yml
Normal file
@ -0,0 +1,18 @@
|
||||
- name: Check desktop file exists
|
||||
ansible.builtin.stat:
|
||||
path: "{{ item }}"
|
||||
register: p
|
||||
|
||||
- name: Edit desktop file
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ item }}"
|
||||
insertafter: '^Type'
|
||||
line: 'NoDisplay=true'
|
||||
firstmatch: true
|
||||
state: present
|
||||
become: true
|
||||
when: p.stat.exists
|
||||
|
||||
- debug:
|
||||
msg: "Warning - {{ item }} does not exist"
|
||||
when: p.stat.exists == False
|
33
provision/fedora/ansible/tasks/include/xbps-src.yml
Normal file
33
provision/fedora/ansible/tasks/include/xbps-src.yml
Normal file
@ -0,0 +1,33 @@
|
||||
- name: Clone or pull void-packages
|
||||
ansible.builtin.git:
|
||||
repo: 'https://github.com/starr-dusT/void-packages.git'
|
||||
dest: /home/{{ user }}/git/void-packages
|
||||
update: yes
|
||||
register: git_return
|
||||
|
||||
- name: Bootstrap if newly cloned
|
||||
ansible.builtin.command: ./xbps-src binary-bootstrap
|
||||
args:
|
||||
chdir: /home/{{ user }}/git/void-packages
|
||||
when: not git_return.before
|
||||
|
||||
- name: Enable restricted if newly cloned
|
||||
copy:
|
||||
dest: /home/{{ user }}/git/void-packages/etc/conf
|
||||
content: |
|
||||
XBPS_ALLOW_RESTRICTED=yes
|
||||
when: not git_return.before
|
||||
|
||||
- name: Package {{ item.package }} with xbps-src
|
||||
ansible.builtin.command: ./xbps-src pkg {{ item.package }}
|
||||
args:
|
||||
chdir: /home/{{ user }}/git/void-packages
|
||||
|
||||
- name: Install packaged {{ item.package }}
|
||||
expect:
|
||||
command: xbps-install --repository {{ item.repository }} {{ item.package }}
|
||||
responses:
|
||||
continue: y
|
||||
args:
|
||||
chdir: /home/{{ user }}/git/void-packages
|
||||
become: true
|
4
provision/fedora/ansible/tasks/system/_main.yml
Normal file
4
provision/fedora/ansible/tasks/system/_main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
||||
- import_tasks: configs.yml
|
||||
tags: ["configs"]
|
20
provision/fedora/ansible/tasks/system/configs.yml
Normal file
20
provision/fedora/ansible/tasks/system/configs.yml
Normal file
@ -0,0 +1,20 @@
|
||||
- name: Start and enable syncthing
|
||||
tags: ["once"]
|
||||
systemd:
|
||||
name: syncthing@{{ user }}
|
||||
enabled: true
|
||||
state: started
|
||||
become: true
|
||||
|
||||
- name: Set hostname for linux
|
||||
tags: ["once"]
|
||||
shell: >
|
||||
hostnamectl set-hostname {{ hostname }}
|
||||
become: true
|
||||
|
||||
- name: Change sudo settings
|
||||
lineinfile:
|
||||
path: /etc/sudoers
|
||||
regexp: ^Defaults env_reset
|
||||
line: Defaults env_reset,timestamp_timeout=60,!tty_tickets
|
||||
become: yes
|
57
provision/fedora/ansible/tasks/system/packages.yml
Normal file
57
provision/fedora/ansible/tasks/system/packages.yml
Normal file
@ -0,0 +1,57 @@
|
||||
- name: Install rpm-fusion
|
||||
tags: ["once"]
|
||||
block:
|
||||
- name: Importing (free) key
|
||||
ansible.builtin.rpm_key:
|
||||
state: present
|
||||
key: https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-free-fedora-2020
|
||||
|
||||
- name: Importing (non-free) key
|
||||
ansible.builtin.rpm_key:
|
||||
state: present
|
||||
key: https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-nonfree-fedora-2020
|
||||
|
||||
- name: install the rpmfusion repo packages
|
||||
dnf:
|
||||
name:
|
||||
- http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-{{ ansible_distribution_major_version }}.noarch.rpm
|
||||
- http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{ ansible_distribution_major_version }}.noarch.rpm
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Enable iosevka font copr repo
|
||||
community.general.copr:
|
||||
name: peterwu/iosevka
|
||||
state: enabled
|
||||
become: true
|
||||
|
||||
- name: Install system fedora packages
|
||||
dnf:
|
||||
name:
|
||||
- git # Fast Version Control System
|
||||
- git-lfs # Git extension for versioning large files
|
||||
- syncthing # Continuous File Synchronization
|
||||
- flatpak # Application deployment framework for desktop apps
|
||||
- wireguard-tools # Fast, modern, secure vpn tunnel
|
||||
- pipewire-codec-aptx # PipeWire Bluetooth aptX codec plugin
|
||||
- ansible # Simple deployment, configuration management and execution framework
|
||||
- '@Development tools' # Development tools for Fedora
|
||||
- '@virtualization' # Virtualization tools for Fedora
|
||||
- trash-cli # Command line interface to the freedesktop.org trashcan
|
||||
- android-tools # Android platform tools(adb, fastboot)
|
||||
- snapper
|
||||
- python3-dnf-plugin-snapper
|
||||
- cargo
|
||||
- iosevka-fonts
|
||||
- borgbackup
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Install chezmoi
|
||||
ansible.builtin.shell: sh -c "$(curl -fsLS get.chezmoi.io)" -- -b $HOME/.local/bin # Manage your dotfiles across multiple machines, securely
|
||||
|
||||
- name: Add the flathub flatpak repository remote
|
||||
tags: ["once"]
|
||||
shell: |
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
become: true
|
4
provision/fedora/ansible/tasks/terminal/_main.yml
Normal file
4
provision/fedora/ansible/tasks/terminal/_main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
||||
- import_tasks: configs.yml
|
||||
tags: ["configs"]
|
12
provision/fedora/ansible/tasks/terminal/configs.yml
Normal file
12
provision/fedora/ansible/tasks/terminal/configs.yml
Normal file
@ -0,0 +1,12 @@
|
||||
- name: change {{ user }} shell to zsh
|
||||
tags: ["once"]
|
||||
user:
|
||||
name: "{{ user }}"
|
||||
shell: /bin/zsh
|
||||
become: true
|
||||
|
||||
- name: Set rbw email
|
||||
tags: ["once"]
|
||||
shell: |
|
||||
rbw config set email {{ bitwarden_email }}
|
||||
|
45
provision/fedora/ansible/tasks/terminal/packages.yml
Normal file
45
provision/fedora/ansible/tasks/terminal/packages.yml
Normal file
@ -0,0 +1,45 @@
|
||||
- name: Enable lf copr repo
|
||||
tags: ["once"]
|
||||
community.general.copr:
|
||||
state: enabled
|
||||
name: pennbauman/ports
|
||||
become: true
|
||||
|
||||
- name: Install terminal fedora packages
|
||||
dnf:
|
||||
name:
|
||||
- neovim # Vim-fork focused on extensibility and agility
|
||||
- task # Command-line TODO list manager
|
||||
- timew # Timewarrior tracks and reports time
|
||||
- python3-tasklib # Library for interacting with taskwarrior databases (Python3)
|
||||
- vifm # Ncurses-based file manager with vi-like keybindings
|
||||
- zsh # Z SHell
|
||||
- tmux # Terminal Multiplexer
|
||||
- nmap # Utility for network discovery and security auditing
|
||||
- w3m # Text-based Web browser and pager (with Debian patches)
|
||||
- lf # Terminal file manager
|
||||
- khal # Command-line calendar build around CalDAV
|
||||
- khard # Command-line addressbook built around CardDAV
|
||||
- vdirsyncer # Synchronize calendars and addressbooks
|
||||
- neofetch # Simple system information script
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Install terminal python packages
|
||||
ansible.builtin.pip:
|
||||
name:
|
||||
- pynvim
|
||||
|
||||
- name: Install terminal cargo packages
|
||||
community.general.cargo:
|
||||
name: rbw # This is an unofficial command line client for Bitwarden
|
||||
|
||||
- name: Install github release binaries
|
||||
include_tasks: ../include/download-github-archive.yml
|
||||
loop:
|
||||
- user: kdheepak
|
||||
repo: taskwarrior-tui
|
||||
regex: unknown-linux-gnu.tar.gz
|
||||
- user: mickael-menu
|
||||
repo: zk
|
||||
regex: linux-amd64.tar.gz
|
18
provision/fedora/checklist.md
Normal file
18
provision/fedora/checklist.md
Normal file
@ -0,0 +1,18 @@
|
||||
# Checklist
|
||||
|
||||
I can be forgetful so this document tracks what [additional setup](./additional-setup.md)
|
||||
has been done :)
|
||||
|
||||
- [ ] Snapper
|
||||
- [ ] Wireguard Client
|
||||
- [ ] Mount network drives
|
||||
- [ X ] Taskopen for taskwarrior
|
||||
- [ ] Syncthing
|
||||
- [ ] Lxappearance
|
||||
- [ ] Git SSH for personal and work
|
||||
- [ X ] Firefox
|
||||
- [ X ] Dracula colorscheme for gnome terminal
|
||||
- [ X ] Bluetooth Audio
|
||||
- [ X ] Linux-tkg kernel
|
||||
- [ X ] Single GPU Passthrough to windows
|
||||
- [ ] Google earth pro
|
54
provision/fedora/jumpstart.sh
Executable file
54
provision/fedora/jumpstart.sh
Executable file
@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo -e "Starting initial setup for Fedora..."
|
||||
|
||||
CHEZDIR="$HOME/.local/share/chezmoi"
|
||||
echo "Input email for bitwarden:"
|
||||
read bitemail
|
||||
|
||||
# Install ansible python dependencies
|
||||
sudo dnf update -y
|
||||
sudo dnf install python3 python3-pip ansible cargo -y
|
||||
pip install pexpect
|
||||
cargo install rbw
|
||||
|
||||
# Add things to path for this script
|
||||
export PATH="$PATH:/usr/local/bin"
|
||||
export PATH="$PATH:$HOME/.cargo/bin"
|
||||
export PATH="$PATH:$CHEZDIR/temp_bin"
|
||||
|
||||
# Install ansible extensions
|
||||
ansible-galaxy install -r "$CHEZDIR/provision/fedora/ansible/requirements.yml"
|
||||
|
||||
# Run setup playbook
|
||||
ansible-playbook "$CHEZDIR/provision/fedora/ansible/setup.yml" -i "$CHEZDIR/provision/fedora/ansible/hosts" --ask-become-pass
|
||||
|
||||
# Copy jumpstart scripts to temp bin dir and add to path
|
||||
mkdir -p "$CHEZDIR/temp_bin"
|
||||
cp "$CHEZDIR/home/bin/executable_rbw-get" "$CHEZDIR/temp_bin/rbw-get"
|
||||
chmod +x "$CHEZDIR/temp_bin/rbw-get"
|
||||
|
||||
# Set bitwarden email
|
||||
rbw config set email "$bitemail"
|
||||
|
||||
# Make temporary i3 gen file
|
||||
mkdir -p "$CHEZDIR/home/.gen"
|
||||
echo "{
|
||||
\"disp_pri\": \"HDMI-0\",
|
||||
\"disp_sec\": \"HDMI-0\"
|
||||
}" > "$CHEZDIR/home/.gen/i3.json"
|
||||
|
||||
# initialize chezmoi
|
||||
chezmoi init
|
||||
|
||||
# first chezmoi apply
|
||||
chezmoi apply
|
||||
|
||||
# reboot!
|
||||
read -p "You should reboot, but I won't make you. Reboot? " -n 1 -r
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo reboot
|
33
provision/fedora/readme.md
Normal file
33
provision/fedora/readme.md
Normal file
@ -0,0 +1,33 @@
|
||||
# Provision Fedora
|
||||
> \*Tips Fedora\*
|
||||
|
||||
Jumpstart scripts to install Fedora with packages and configs I use.
|
||||
|
||||
## Usage
|
||||
|
||||
Install Fedora Workstation with BTRFS and partition:
|
||||
|
||||
```
|
||||
1. 512Mb EFI partition at /boot/EFI
|
||||
2. BTRFS volume "root" at / that fills rest of drive
|
||||
3. BTFS subvolume "home" at /home
|
||||
```
|
||||
|
||||
Run the following commands:
|
||||
|
||||
```bash
|
||||
sudo dnf install vim git -y
|
||||
git clone --recurse-submodules https://github.com/starr-dusT/dotfiles ~/.local/share/chezmoi
|
||||
```
|
||||
|
||||
Copy `.chezmoidata.yaml.example` to `.chezmoidata.yaml` and edit with desired settings then run the following commands:
|
||||
|
||||
```bash
|
||||
~/.local/share/chezmoi/provision/fedora/jumpstart.sh
|
||||
```
|
||||
|
||||
Perform additional setup found in [additional-setup](additional-setup.md)
|
||||
|
||||
## Update Setup
|
||||
|
||||
`linux-update --fedora` command updates the system with ansible. Run `linux-update -h` for information on usage.
|
@ -1 +0,0 @@
|
||||
Subproject commit d9783fda8f590c18df7632fe43573a45f9121086
|
103
provision/void/additional-setup.md
Normal file
103
provision/void/additional-setup.md
Normal file
@ -0,0 +1,103 @@
|
||||
# Additional Setup
|
||||
|
||||
The following documents Void setup that wasn't automated with ansible.
|
||||
|
||||
## Radicale and vdirsyncer for contacts/calendar
|
||||
|
||||
[Radicale](https://radicale.org/v3.html) is hosted on my home server to provide
|
||||
DAV synced calendars and contacts. [Vdirsyncer](https://github.com/pimutils/vdirsyncer)
|
||||
allows for the files to be synced to the linux filesystem for desktop usage
|
||||
with [khard](https://github.com/lucc/khard) and [khal](https://github.com/pimutils/khal).
|
||||
The config files are auto-populated by chezmoi with credentials from bitwarden
|
||||
run the following commands to setup vdirsyncer files:
|
||||
|
||||
```bash
|
||||
vdirsyncer -c ~/.config/vdirsyncer/config_calendar discover
|
||||
vdirsyncer -c ~/.config/vdirsyncer/config_contacts discover
|
||||
```
|
||||
|
||||
Files can be later synced with the following commands:
|
||||
|
||||
```bash
|
||||
vdirsyncer -c ~/.config/vdirsyncer/config_calendar sync
|
||||
vdirsyncer -c ~/.config/vdirsyncer/config_contacts sync
|
||||
```
|
||||
|
||||
## Wireguard Client
|
||||
|
||||
Wireguard is nice for a home vpn and [pivpn](https://pivpn.io/) makes it easy.
|
||||
|
||||
1. Create client on server and copy resulting `.conf` file to local machine
|
||||
2. Import to networkmanager with:
|
||||
```bash
|
||||
nmcli connection import type wireguard file <conf file from pivpn>
|
||||
```
|
||||
3. Turn on/off from nm-applet
|
||||
|
||||
## BTRFS back-ups with btrbk
|
||||
|
||||
[btrbk](https://github.com/digint/btrbk) is used to create snapshots of the
|
||||
root and user volumes. User volumes are backed-up to my home server (Torus),
|
||||
but root is only stored locally.
|
||||
|
||||
```bash
|
||||
sudo btrbk -c ~/.config/btrbk/home_btrbk.conf -v run # snapshot /home/<user>
|
||||
sudo btrbk -c ~/.config/btrbk/root_btrbk.conf -v run # snapshot /
|
||||
```
|
||||
|
||||
SSH keypair is used for password-less root ssh for remote back-up. See
|
||||
[ssh setup](https://github.com/digint/btrbk#setting-up-ssh) from the btrbk
|
||||
readme.
|
||||
|
||||
anacron is used for daily backups. Copy `home_backup.sh` from the config folder
|
||||
to `/etc/cron.daily`.
|
||||
|
||||
## Mount network drives
|
||||
|
||||
I find fstab messing about more troubule than it is worth. Mount network drives
|
||||
when needed with the following command:
|
||||
|
||||
```bash
|
||||
linux-mount-<network drive name>
|
||||
```
|
||||
|
||||
## Taskopen for taskwarrior
|
||||
|
||||
[taskopen](https://github.com/jschlatow/taskopeni) is easier to install
|
||||
manually at this point since it isn't packaged and uses nim. Might get this
|
||||
automated in the future.
|
||||
|
||||
```bash
|
||||
curl https://nim-lang.org/choosenim/init.sh -sSf | sh # install nim
|
||||
git clone https://github.com/jschlatow/taskopen.git
|
||||
cd taskopen
|
||||
make PREFIX=/usr
|
||||
sudo make PREFIX=/usr install
|
||||
```
|
||||
|
||||
## Syncthing
|
||||
|
||||
Syncthing is used to sync folders between various computers and android. The
|
||||
ansible script should setup and run the service, but shares must be setup
|
||||
via the web gui. Currently four shares exists:
|
||||
- `.warrior` - `.task` and `.timewarrior` folders to sync taskwarrior tasks.
|
||||
These two folders are symlinked to the home folder where taskwarrior/timewarrior
|
||||
expects them.
|
||||
- `warrior` - contains text files associated with taskwarrior (mostly from
|
||||
taskopen).
|
||||
- `phone photos` - personal photos synched from android.
|
||||
- `phone screenshots` - personal screenshots synced from android.
|
||||
- `keys` - contains ssh keys for git remotes (~/.ssh/keys)
|
||||
|
||||
## Lxappearance
|
||||
|
||||
My GTK theme is pulled down by chezmoi, but isn't active by default. This can
|
||||
be fixed with the lxappearance gui.
|
||||
|
||||
## nb notebooks
|
||||
|
||||
Remote nb notebooks are added with the following command:
|
||||
|
||||
```bash
|
||||
nb notebooks add <notebook name> https://github.com/starr-dusT/nb <branch>
|
||||
```
|
1
provision/void/ansible/hosts
Normal file
1
provision/void/ansible/hosts
Normal file
@ -0,0 +1 @@
|
||||
local ansible_connection=local ansible_python_interpreter=/usr/bin/python3
|
8
provision/void/ansible/requirements.yml
Normal file
8
provision/void/ansible/requirements.yml
Normal file
@ -0,0 +1,8 @@
|
||||
# Ansible Galaxy Roles
|
||||
roles:
|
||||
- src: https://github.com/starr-dusT/ansible-role-customize-gnome
|
||||
- src: https://github.com/starr-dusT/ansible-rustup
|
||||
collections:
|
||||
- name: community.general
|
||||
version: 6.0.1
|
||||
source: https://galaxy.ansible.com
|
14
provision/void/ansible/setup.yml
Normal file
14
provision/void/ansible/setup.yml
Normal file
@ -0,0 +1,14 @@
|
||||
- name: Ansible playbook to setup void linux
|
||||
hosts: all
|
||||
|
||||
vars_files:
|
||||
- ../home/.chezmoidata.yaml
|
||||
|
||||
tasks:
|
||||
- import_tasks: tasks/system/_main.yml
|
||||
- import_tasks: tasks/terminal/_main.yml
|
||||
- import_tasks: tasks/development/_main.yml
|
||||
- import_tasks: tasks/desktop/_main.yml
|
||||
- import_tasks: tasks/gaming/_main.yml
|
||||
- import_tasks: tasks/engineering/_main.yml
|
||||
|
7
provision/void/ansible/tasks/desktop/_main.yml
Normal file
7
provision/void/ansible/tasks/desktop/_main.yml
Normal file
@ -0,0 +1,7 @@
|
||||
- import_tasks: configs.yml
|
||||
tags: ["configs"]
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
||||
- import_tasks: gnome-settings/_main.yml
|
||||
tags: ["configs"]
|
||||
when: desktop == "gnome"
|
19
provision/void/ansible/tasks/desktop/configs.yml
Normal file
19
provision/void/ansible/tasks/desktop/configs.yml
Normal file
@ -0,0 +1,19 @@
|
||||
- name: Set desktop files to hide
|
||||
include_tasks: ../include/hide-desktop.yml
|
||||
loop:
|
||||
- /usr/share/applications/wine-winhelp.desktop
|
||||
- /usr/share/applications/wine-mime-msi.desktop
|
||||
- /usr/share/applications/wine-notepad.desktop
|
||||
- /usr/share/applications/wine-oleview.desktop
|
||||
- /usr/share/applications/wine-regedit.desktop
|
||||
- /usr/share/applications/wine-uninstaller.desktop
|
||||
- /usr/share/applications/wine-wineboot.desktop
|
||||
- /usr/share/applications/wine-winecfg.desktop
|
||||
- /usr/share/applications/wine-winefile.desktop
|
||||
- /usr/share/applications/wine-winemine.desktop
|
||||
- /usr/share/applications/wine-wordpad.desktop
|
||||
- /usr/share/applications/vifm.desktop
|
||||
- /usr/share/applications/dosbox-staging.desktop
|
||||
- /usr/share/applications/nvim.desktop
|
||||
- /usr/share/applications/syncthing-start.desktop
|
||||
- /usr/share/applications/syncthing-ui.desktop
|
@ -0,0 +1,17 @@
|
||||
- name: Set custom gnome binding {{ index }}
|
||||
dconf:
|
||||
key: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom{{ index }}/binding"
|
||||
value: "{{ item.bind }}"
|
||||
state: present
|
||||
|
||||
- name: Set custom gnome command {{ index }}
|
||||
dconf:
|
||||
key: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom{{ index }}/command"
|
||||
value: "{{ item.command }}"
|
||||
state: present
|
||||
|
||||
- name: Set custom gnome name {{ index }}
|
||||
dconf:
|
||||
key: "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom{{ index }}/name"
|
||||
value: "{{ index }}"
|
||||
state: present
|
@ -0,0 +1,6 @@
|
||||
- import_tasks: extensions.yml
|
||||
tags: ["gnome-extensions"]
|
||||
- import_tasks: keybinds.yml
|
||||
tags: ["configs"]
|
||||
- import_tasks: window-management.yml
|
||||
tags: ["configs"]
|
@ -0,0 +1,11 @@
|
||||
- name: Install gnome extensions
|
||||
include_role:
|
||||
name: ansible-role-customize-gnome
|
||||
vars:
|
||||
# For now extensions aren't enabled (https://github.com/PeterMosmans/ansible-role-customize-gnome/issues/25)
|
||||
gnome_extensions:
|
||||
- id: 779 # https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator
|
||||
- id: 4362 # https://github.com/Noobsai/fullscreen-avoider
|
||||
- id: 1460 # https://github.com/corecoding/Vitals
|
||||
- id: 7 # https://gitlab.gnome.org/GNOME/gnome-shell-extensions
|
||||
gnome_user: "{{ user }}"
|
@ -0,0 +1,62 @@
|
||||
- name: Unset particular default gnome keybinds
|
||||
dconf:
|
||||
key: "{{ item }}"
|
||||
value: [""]
|
||||
state: present
|
||||
loop:
|
||||
- "/org/gnome/shell/keybindings/switch-to-application-1"
|
||||
- "/org/gnome/shell/keybindings/switch-to-application-2"
|
||||
- "/org/gnome/shell/keybindings/switch-to-application-3"
|
||||
- "/org/gnome/shell/keybindings/switch-to-application-4"
|
||||
- "/org/gnome/shell/keybindings/switch-to-application-5"
|
||||
- "/org/gnome/desktop/wm/keybindings/switch-input-source"
|
||||
- "/org/gnome/desktop/wm/keybindings/switch-input-source-backwards"
|
||||
- "/org/gnome/settings-daemon/plugins/media-keys/screensaver"
|
||||
- "/org/gnome/desktop/wm/keybindings/switch-applications"
|
||||
- "/org/gnome/desktop/wm/keybindings/switch-applications-backward"
|
||||
- "/org/gnome/desktop/wm/keybindings/switch-windows"
|
||||
- "/org/gnome/desktop/wm/keybindings/switch-windows-backward"
|
||||
|
||||
- name: Change existing gnome keybinds
|
||||
dconf:
|
||||
key: "{{ item.key }}"
|
||||
value: "{{ item.value }}"
|
||||
state: present
|
||||
loop:
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/switch-to-workspace-1", value: ["<Super>1"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/switch-to-workspace-2", value: ["<Super>2"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/switch-to-workspace-3", value: ["<Super>3"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/switch-to-workspace-4", value: ["<Super>4"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/switch-to-workspace-5", value: ["<Super>5"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/move-to-workspace-1", value: ["<Super><Shift>1"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/move-to-workspace-2", value: ["<Super><Shift>2"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/move-to-workspace-3", value: ["<Super><Shift>3"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/move-to-workspace-4", value: ["<Super><Shift>4"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/move-to-workspace-5", value: ["<Super><Shift>5"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/minimize", value: ["<Super>Space"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/toggle-fullscreen", value: ["<Super>F"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/close", value: ["<Super>Q"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/maximize-horizontally", value: ["<Super><Shift>H"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/maximize-vertically", value: ["<Super><Shift>V"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/move-to-center", value: ["<Super>C"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/switch-windows", value: ["<Super>Tab"]}
|
||||
- {key: "/org/gnome/desktop/wm/keybindings/switch-windows-backward", value: ["<Super><Shift>Tab"]}
|
||||
- {key: "/org/gnome/settings-daemon/plugins/media-keys/screensaver", value: ["<Super><Shift>L"]}
|
||||
|
||||
- name: Set custom gnome keybinds
|
||||
include_tasks: _custom-bind.yml
|
||||
loop:
|
||||
- {command: "'gnome-terminal'", bind: "'<Super>Return'"}
|
||||
- {command: "'firefox'", bind: "'<Super><Shift>B'"}
|
||||
- {command: "'code'", bind: "'<Super><Shift>V'"}
|
||||
loop_control:
|
||||
index_var: index
|
||||
|
||||
# Gnome requires an array of strings with the custom keybinds
|
||||
# this must match the number of keybinds defined above...
|
||||
- name: Set custom-keybinds array
|
||||
dconf:
|
||||
key: /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings
|
||||
value: "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/',
|
||||
'/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/',
|
||||
'/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/']"
|
@ -0,0 +1,10 @@
|
||||
|
||||
- name: Set Static workspaces
|
||||
dconf:
|
||||
key: "/org/gnome/mutter/dynamic-workspaces"
|
||||
value: "false"
|
||||
|
||||
- name: Set Number of workspaces
|
||||
dconf:
|
||||
key: "/org/gnome/desktop/wm/preferences/num-workspaces"
|
||||
value: "5"
|
51
provision/void/ansible/tasks/desktop/packages.yml
Normal file
51
provision/void/ansible/tasks/desktop/packages.yml
Normal file
@ -0,0 +1,51 @@
|
||||
- name: Install desktop void packages
|
||||
xbps:
|
||||
name:
|
||||
- xorg # X.org meta-package
|
||||
- xterm # X Terminal Emulator
|
||||
- alacritty # Cross-platform, GPU-accelerated terminal emulator
|
||||
- mpv # Video player based on MPlayer/mplayer2
|
||||
- python3-i3ipc # Improved Python library to control i3wm and sway
|
||||
- xprop # Property displayer for X
|
||||
- lxappearance # LXDE Theme Switcher
|
||||
- blueman # GTK+ Bluetooth Manager
|
||||
- xrandr # Primitive command line interface to RandR extension
|
||||
- dunst # Lightweight and customizable notification daemon
|
||||
- ffmpeg # Decoding, encoding and streaming software
|
||||
- i3 # Improved tiling window manager
|
||||
- i3status # Status bar generator for i3bar, dzen2, xmobar or similar programs
|
||||
- nitrogen # Background browser and setter for X with support for Xinerama
|
||||
- nvidia # NVIDIA drivers for linux - Libraries and Utilities
|
||||
- nvidia-libs-32bit # NVIDIA drivers for linux - common libraries (32bit)
|
||||
- pavucontrol # PulseAudio Volume Control
|
||||
- polybar # Fast and easy-to-use status bar
|
||||
- rofi # Window switcher, run dialog and dmenu replacement
|
||||
- pcmanfm # LXDE file manager
|
||||
- xclip # Command line interface to the X11 clipboard
|
||||
- autorandr # Automatically select a display configuration based on connected devices
|
||||
- xsel # Command-line getting and setting the contents of the X selection
|
||||
- clipmenu # Clipboard management using dmenu
|
||||
- nerd-fonts # Iconic font aggregator, collection and patcher
|
||||
- xdotool # Command-line X11 automation tool
|
||||
- flameshot # Powerful yet simple to use screenshot software for GNU/Linux
|
||||
- system-config-printer # CUPS printer configuration tool and status applet
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Install desktop xbps-src packages
|
||||
tags: ["src"]
|
||||
include_tasks: ../include/xbps-src.yml
|
||||
loop:
|
||||
- package: rofi-rbw # Simplistic password typer/copier using rofi and wofi
|
||||
repository: hostdir/binpkgs
|
||||
|
||||
- name: Install desktop flatpaks
|
||||
flatpak:
|
||||
name:
|
||||
- org.mozilla.firefox # Mozilla Firefox web browser
|
||||
- com.discordapp.Discord # VoIP and instant messaging social platform
|
||||
- org.gimp.GIMP # Create images and edit photographs
|
||||
- org.inkscape.Inkscape # Vector Graphics Editor
|
||||
- com.github.tchx84.Flatseal # Manage Flatpak permissions
|
||||
state: present
|
||||
become: true
|
4
provision/void/ansible/tasks/development/_main.yml
Normal file
4
provision/void/ansible/tasks/development/_main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
- import_tasks: configs.yml
|
||||
tags: ["configs"]
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
5
provision/void/ansible/tasks/development/configs.yml
Normal file
5
provision/void/ansible/tasks/development/configs.yml
Normal file
@ -0,0 +1,5 @@
|
||||
- name: Setup nvm
|
||||
tags: ["once"]
|
||||
shell: >
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
|
||||
creates=/home/{{ user }}/.nvm/nvm.sh
|
25
provision/void/ansible/tasks/development/packages.yml
Normal file
25
provision/void/ansible/tasks/development/packages.yml
Normal file
@ -0,0 +1,25 @@
|
||||
- name: Install development void packages
|
||||
xbps:
|
||||
name:
|
||||
- python3 # Python programming language (3.11 series)
|
||||
- python3-pip # A tool for installing and managing Python3 packages
|
||||
- ripgrep # Fast search tool inspired by ag and grep
|
||||
- fd # Simple, fast and user-friendly alternative to find
|
||||
- lazygit # Simple terminal UI for git commands
|
||||
- ruby-tmuxinator # Create and manage complex tmux sessions easily
|
||||
- python3-pipenv # Python Development Workflow for Humans
|
||||
- python3-devel # Python programming language (3.11 series) - development files
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Install development python packages
|
||||
ansible.builtin.pip:
|
||||
name:
|
||||
- ansible-lint # Command-line tool for linting playbooks, roles and collections
|
||||
|
||||
- name: Install development flatpaks
|
||||
flatpak:
|
||||
name:
|
||||
- com.vscodium.codium # Free/Libre Open Source Software Binaries of VS Code
|
||||
state: present
|
||||
become: true
|
2
provision/void/ansible/tasks/engineering/_main.yml
Normal file
2
provision/void/ansible/tasks/engineering/_main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
8
provision/void/ansible/tasks/engineering/packages.yml
Normal file
8
provision/void/ansible/tasks/engineering/packages.yml
Normal file
@ -0,0 +1,8 @@
|
||||
- name: Install engineering void packages
|
||||
xbps:
|
||||
name:
|
||||
- freecad # General purpose 3D CAD modeler
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- include_tasks: superslicer.yml # PrusaSlicer fork (which is a slic3r fork)
|
6
provision/void/ansible/tasks/engineering/superslicer.yml
Normal file
6
provision/void/ansible/tasks/engineering/superslicer.yml
Normal file
@ -0,0 +1,6 @@
|
||||
- name: Install SuperSlicer
|
||||
include_tasks: ../include/download-github-bin.yml
|
||||
loop:
|
||||
- user: supermerill
|
||||
repo: SuperSlicer
|
||||
regex: "SuperSlicer-ubuntu_18.04-[0-9]"
|
2
provision/void/ansible/tasks/gaming/_main.yml
Normal file
2
provision/void/ansible/tasks/gaming/_main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
13
provision/void/ansible/tasks/gaming/packages.yml
Normal file
13
provision/void/ansible/tasks/gaming/packages.yml
Normal file
@ -0,0 +1,13 @@
|
||||
- name: Install gaming void packages
|
||||
xbps:
|
||||
name:
|
||||
- libdrm-32bit # Userspace interface to kernel DRM services (32bit)
|
||||
- libgcc-32bit # GNU Compiler Collection - GCC library (32bit)
|
||||
- libstdc++-32bit # GNU Compiler Collection - Standard C++ Library (32bit)
|
||||
- mesa-dri-32bit # Mesa DRI drivers (32bit)
|
||||
- steam # Launcher for the Steam software distribution service
|
||||
- lutris # Video game preservation platform
|
||||
- gamemode # Optimize system performance for games on demand
|
||||
- wine # A compatibility layer for windows applications
|
||||
state: present
|
||||
become: true
|
@ -0,0 +1,16 @@
|
||||
- name: Get {{ item.repo }} release information
|
||||
uri:
|
||||
url: https://api.github.com/repos/{{ item.user }}/{{ item.repo }}/releases/latest
|
||||
return_content: true
|
||||
register: repo_latest
|
||||
|
||||
- name: Install archived {{ item.repo }} - {{ repo_latest.json.tag_name }}
|
||||
loop: "{{ repo_latest.json.assets }}"
|
||||
when: "asset.name is regex(item.regex)"
|
||||
unarchive:
|
||||
src: "{{ asset.browser_download_url }}"
|
||||
dest: /usr/local/bin
|
||||
remote_src: true
|
||||
loop_control:
|
||||
loop_var: asset
|
||||
become: true
|
16
provision/void/ansible/tasks/include/download-github-bin.yml
Normal file
16
provision/void/ansible/tasks/include/download-github-bin.yml
Normal file
@ -0,0 +1,16 @@
|
||||
- name: Get {{ item.repo }} release information
|
||||
uri:
|
||||
url: https://api.github.com/repos/{{ item.user }}/{{ item.repo }}/releases/latest
|
||||
return_content: true
|
||||
register: repo_latest
|
||||
|
||||
- name: Install un-archived {{ item.repo }} - {{ repo_latest.json.tag_name }}
|
||||
loop: "{{ repo_latest.json.assets }}"
|
||||
when: "asset.name is regex(item.regex)"
|
||||
get_url:
|
||||
url: "{{ asset.browser_download_url }}"
|
||||
dest: /usr/local/bin/{{ item.repo }}
|
||||
mode: 0775
|
||||
loop_control:
|
||||
loop_var: asset
|
||||
become: true
|
18
provision/void/ansible/tasks/include/hide-desktop.yml
Normal file
18
provision/void/ansible/tasks/include/hide-desktop.yml
Normal file
@ -0,0 +1,18 @@
|
||||
- name: Check desktop file exists
|
||||
ansible.builtin.stat:
|
||||
path: "{{ item }}"
|
||||
register: p
|
||||
|
||||
- name: Edit desktop file
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ item }}"
|
||||
insertafter: '^Type'
|
||||
line: 'NoDisplay=true'
|
||||
firstmatch: true
|
||||
state: present
|
||||
become: true
|
||||
when: p.stat.exists
|
||||
|
||||
- debug:
|
||||
msg: "Warning - {{ item }} does not exist"
|
||||
when: p.stat.exists == False
|
33
provision/void/ansible/tasks/include/xbps-src.yml
Normal file
33
provision/void/ansible/tasks/include/xbps-src.yml
Normal file
@ -0,0 +1,33 @@
|
||||
- name: Clone or pull void-packages
|
||||
ansible.builtin.git:
|
||||
repo: 'https://github.com/starr-dusT/void-packages.git'
|
||||
dest: /home/{{ user }}/git/void-packages
|
||||
update: yes
|
||||
register: git_return
|
||||
|
||||
- name: Bootstrap if newly cloned
|
||||
ansible.builtin.command: ./xbps-src binary-bootstrap
|
||||
args:
|
||||
chdir: /home/{{ user }}/git/void-packages
|
||||
when: not git_return.before
|
||||
|
||||
- name: Enable restricted if newly cloned
|
||||
copy:
|
||||
dest: /home/{{ user }}/git/void-packages/etc/conf
|
||||
content: |
|
||||
XBPS_ALLOW_RESTRICTED=yes
|
||||
when: not git_return.before
|
||||
|
||||
- name: Package {{ item.package }} with xbps-src
|
||||
ansible.builtin.command: ./xbps-src pkg {{ item.package }}
|
||||
args:
|
||||
chdir: /home/{{ user }}/git/void-packages
|
||||
|
||||
- name: Install packaged {{ item.package }}
|
||||
expect:
|
||||
command: xbps-install --repository {{ item.repository }} {{ item.package }}
|
||||
responses:
|
||||
continue: y
|
||||
args:
|
||||
chdir: /home/{{ user }}/git/void-packages
|
||||
become: true
|
4
provision/void/ansible/tasks/system/_main.yml
Normal file
4
provision/void/ansible/tasks/system/_main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
||||
- import_tasks: configs.yml
|
||||
tags: ["configs"]
|
96
provision/void/ansible/tasks/system/configs.yml
Normal file
96
provision/void/ansible/tasks/system/configs.yml
Normal file
@ -0,0 +1,96 @@
|
||||
- name: Create btrbk snapshot directories
|
||||
block:
|
||||
- file:
|
||||
path: /.snapshots
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0775
|
||||
- file:
|
||||
path: /home/.snapshots
|
||||
state: directory
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0775
|
||||
become: true
|
||||
|
||||
- name: Set git username and email
|
||||
shell: |
|
||||
git config --global user.email {{ git_email }}
|
||||
git config --global user.name {{ git_user }}
|
||||
|
||||
- name: Stop system services
|
||||
shell: |
|
||||
rm -R /var/service/dhcpcd
|
||||
ignore_errors: true
|
||||
become: true
|
||||
|
||||
- name: Start system services
|
||||
shell: |
|
||||
ln -s /etc/sv/dbus /var/service
|
||||
ln -s /etc/sv/polkitd /var/service
|
||||
ln -s /etc/sv/elogind /var/service
|
||||
ln -s /etc/sv/bluetoothd /var/service
|
||||
ln -s /etc/sv/sshd /var/service
|
||||
ln -s /etc/sv/libvirtd /var/service
|
||||
ln -s /etc/sv/virtlockd /var/service
|
||||
ln -s /etc/sv/virtlogd /var/service
|
||||
ln -s /etc/sv/NetworkManager /var/service
|
||||
ln -s /etc/sv/cupsd /var/service
|
||||
ln -s /etc/sv/cups-browsed /var/service
|
||||
ignore_errors: true
|
||||
become: true
|
||||
|
||||
- name: Add {{ user }} to libvirt group
|
||||
shell: |
|
||||
gpasswd -a {{ user }} libvirt
|
||||
become: true
|
||||
|
||||
- name: Setup user services
|
||||
block:
|
||||
- name: Create user folder
|
||||
file:
|
||||
path: /etc/sv/{{ user }}
|
||||
state: directory
|
||||
|
||||
- name: Create user service file
|
||||
copy:
|
||||
dest: /etc/sv/{{ user }}/run
|
||||
content: |
|
||||
#!/bin/sh
|
||||
USER="{{ user }}"
|
||||
GROUPS="$(id -Gn "$USER" | tr ' ' ':')"
|
||||
SVDIR="/home/${USER}/.service"
|
||||
if [ -d ${SVDIR} ]; then
|
||||
chpst -u"${USER}:${GROUPS}" runsvdir ${SVDIR}
|
||||
fi
|
||||
mode: 0755
|
||||
|
||||
- name: Enable user services
|
||||
shell: |
|
||||
ln -s /etc/sv/{{ user }} /var/service
|
||||
ignore_errors: true
|
||||
become: true
|
||||
|
||||
- name: Ensure user services folder exists
|
||||
file:
|
||||
path: /home/{{ user }}/.service
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: Start syncthing as {{ user }}
|
||||
block:
|
||||
- name: Create syncthing folder
|
||||
file:
|
||||
path: /home/{{ user }}/.service/syncthing
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: Create synthing run file
|
||||
copy:
|
||||
dest: /home/{{ user }}/.service/syncthing/run
|
||||
content: |
|
||||
#!/bin/sh
|
||||
export HOME=/home/{{ user }}/
|
||||
exec /usr/bin/syncthing > /dev/null 2>&1
|
||||
mode: 0755
|
54
provision/void/ansible/tasks/system/packages.yml
Normal file
54
provision/void/ansible/tasks/system/packages.yml
Normal file
@ -0,0 +1,54 @@
|
||||
- name: Install system void repos
|
||||
xbps:
|
||||
name:
|
||||
- void-repo-multilib # Void Linux drop-in file for the multilib repository
|
||||
- void-repo-multilib-nonfree # Void Linux drop-in file for the multilib/nonfree repository
|
||||
- void-repo-nonfree # Void Linux drop-in file for the nonfree repository
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Install system void packages
|
||||
xbps:
|
||||
name:
|
||||
- git # Fast Version Control System
|
||||
- git-lfs # Git extension for versioning large files
|
||||
- syncthing # Continuous File Synchronization
|
||||
- flatpak # Application deployment framework for desktop apps
|
||||
- wireguard # Fast, modern, secure vpn tunnel
|
||||
- wireguard-tools # Tool for wireguard
|
||||
- cronie # Runs specified programs at scheduled times
|
||||
- pipewire # Server and user space API to deal with multimedia pipelines
|
||||
- libspa-bluetooth # Server and user space API to deal with multimedia pipelines - bluetooth plugins
|
||||
- cifs-utils # CIFS filesystem user-space tools
|
||||
- ansible # Simple deployment, configuration management and execution framework
|
||||
- btrbk # Backup tool for btrfs subvolumes
|
||||
- chezmoi # Manage your dotfiles across multiple machines, securely
|
||||
- elogind # Standalone logind fork
|
||||
- rsync # Remote fast incremental file transfer tool
|
||||
- unzip # List, test and extract compressed files in a ZIP archive
|
||||
- mimeo # Open files by MIME-type or file name using regular expressions
|
||||
- busybox # Swiss Army Knife of Embedded Linux
|
||||
- qemu # Open Source Processor Emulator
|
||||
- libvirt # Virtualization API for controlling virtualization engines
|
||||
- virt-manager # User interface for managing virtual machines
|
||||
- bridge-utils # Layer2 ethernet bridging for Linux
|
||||
- trash-cli # Command line interface to the freedesktop.org trashcan
|
||||
- udiskie # Removable disk automounter using udisks
|
||||
- curl # Client that groks URLs
|
||||
- wget # GNU wget download utility
|
||||
- NetworkManager # Network Management daemon
|
||||
- network-manager-applet # NetworkManager panel applet for GNOME
|
||||
- psensor # Graphical hardware temperature monitor for Linux
|
||||
- upower # Abstraction for enumerating power devices
|
||||
- android-udev-rules # Android udev rules list aimed to be the most comprehensive on the net
|
||||
- cups # Common Unix Printing System
|
||||
- hplip # HP Linux Imaging and Printing
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Add the flathub flatpak repository remote
|
||||
flatpak_remote:
|
||||
name: flathub
|
||||
state: present
|
||||
flatpakrepo_url: https://flathub.org/repo/flathub.flatpakrepo
|
||||
become: true
|
4
provision/void/ansible/tasks/terminal/_main.yml
Normal file
4
provision/void/ansible/tasks/terminal/_main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
||||
- import_tasks: configs.yml
|
||||
tags: ["configs"]
|
29
provision/void/ansible/tasks/terminal/advcpmv.yml
Normal file
29
provision/void/ansible/tasks/terminal/advcpmv.yml
Normal file
@ -0,0 +1,29 @@
|
||||
- name: Make advcpmv directory
|
||||
file:
|
||||
path: /home/{{ user }}/tmp/advcpmv
|
||||
state: directory
|
||||
|
||||
- name: Download advcpmv file
|
||||
ansible.builtin.get_url:
|
||||
url: https://raw.githubusercontent.com/jarun/advcpmv/master/install.sh
|
||||
dest: /home/{{ user }}/tmp/advcpmv/install.sh
|
||||
|
||||
- name: Compile advcp and advmv
|
||||
command:
|
||||
cmd: sh /home/{{ user }}/tmp/advcpmv/install.sh
|
||||
creates: /home/{{ user }}/tmp/advcpmv/advcp
|
||||
chdir: /home/{{ user }}/tmp/advcpmv
|
||||
|
||||
- name: Move advcp
|
||||
copy:
|
||||
src: /home/{{ user }}/tmp/advcpmv/advcp
|
||||
dest: /usr/local/bin/cpg
|
||||
mode: preserve
|
||||
become: true
|
||||
|
||||
- name: Move advmv
|
||||
copy:
|
||||
src: /home/{{ user }}/tmp/advcpmv/advmv
|
||||
dest: /usr/local/bin/mvg
|
||||
mode: preserve
|
||||
become: true
|
10
provision/void/ansible/tasks/terminal/configs.yml
Normal file
10
provision/void/ansible/tasks/terminal/configs.yml
Normal file
@ -0,0 +1,10 @@
|
||||
- name: change {{ user }} shell to zsh
|
||||
user:
|
||||
name: "{{ user }}"
|
||||
shell: /bin/zsh
|
||||
become: true
|
||||
|
||||
|
||||
- name: Set rbw email
|
||||
shell: |
|
||||
rbw config set email {{ bitwarden_email }}
|
6
provision/void/ansible/tasks/terminal/nb.yml
Normal file
6
provision/void/ansible/tasks/terminal/nb.yml
Normal file
@ -0,0 +1,6 @@
|
||||
- name: Install nb
|
||||
ansible.builtin.get_url:
|
||||
url: https://raw.github.com/xwmx/nb/master/nb
|
||||
dest: /usr/local/bin/nb
|
||||
mode: 0755
|
||||
become: true
|
34
provision/void/ansible/tasks/terminal/packages.yml
Normal file
34
provision/void/ansible/tasks/terminal/packages.yml
Normal file
@ -0,0 +1,34 @@
|
||||
- name: Install terminal void packages
|
||||
xbps:
|
||||
name:
|
||||
- neovim # Vim-fork focused on extensibility and agility
|
||||
- task # Command-line TODO list manager
|
||||
- timewarrior # Timewarrior tracks and reports time
|
||||
- python3-tasklib # Library for interacting with taskwarrior databases (Python3)
|
||||
- vifm # Ncurses-based file manager with vi-like keybindings
|
||||
- zsh # Z SHell
|
||||
- tmux # Terminal Multiplexer
|
||||
- nmap # Utility for network discovery and security auditing
|
||||
- w3m # Text-based Web browser and pager (with Debian patches)
|
||||
- lf # Terminal file manager
|
||||
- khal # Command-line calendar build around CalDAV
|
||||
- khard # Command-line addressbook built around CardDAV
|
||||
- vdirsyncer # Synchronize calendars and addressbooks
|
||||
- neofetch # Simple system information script
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Install terminal python packages
|
||||
ansible.builtin.pip:
|
||||
name:
|
||||
- pynvim
|
||||
|
||||
- name: Install terminal xbps-src packages
|
||||
tags: ["src"]
|
||||
include_tasks: ../include/xbps-src.yml
|
||||
loop:
|
||||
- package: rbw # Unofficial command line client for bitwarden
|
||||
repository: hostdir/binpkgs
|
||||
|
||||
- include_tasks: nb.yml # Command line and local web note‑taking, bookmarking, archiving, and knowledge base application
|
||||
- include_tasks: taskwarrior-tui.yml # Terminal User Interface (TUI) for Taskwarrior
|
@ -0,0 +1,6 @@
|
||||
- name: Install taskwarrior-tui
|
||||
include_tasks: ../include/download-github-archive.yml
|
||||
loop:
|
||||
- user: kdheepak
|
||||
repo: taskwarrior-tui
|
||||
regex: unknown-linux-gnu.tar.gz
|
52
provision/void/jumpstart.sh
Executable file
52
provision/void/jumpstart.sh
Executable file
@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo -e "Starting initial setup..."
|
||||
|
||||
CHEZDIR="/home/test/.local/share/chezmoi"
|
||||
echo "Input email for bitwarden:"
|
||||
read bitemail
|
||||
|
||||
# Install ansible python dependencies
|
||||
sudo xbps-install -Syu -y
|
||||
sudo xbps-install python3 python3-pip ansible -y
|
||||
sudo pip install pexpect
|
||||
|
||||
# Install ansible extensions
|
||||
ansible-galaxy install -r "$CHEZDIR/provision/requirements.yml"
|
||||
|
||||
# Run setup playbook
|
||||
ansible-playbook "$CHEZDIR/provision/setup.yml" -i "$CHEZDIR/provision/hosts" --ask-become-pass
|
||||
|
||||
export PATH="$PATH:/usr/local/bin"
|
||||
|
||||
# Copy jumpstart scripts to temp bin dir and add to path
|
||||
mkdir -p "$CHEZDIR/temp_bin"
|
||||
cp "$CHEZDIR/home/bin/executable_rbw-get" "$CHEZDIR/temp_bin/rbw-get"
|
||||
chmod +x "$CHEZDIR/temp_bin/rbw-get"
|
||||
export PATH="$PATH:$CHEZDIR/temp_bin"
|
||||
|
||||
# Set bitwarden email
|
||||
rbw config set email "$bitemail"
|
||||
|
||||
# Make temporary i3 gen file
|
||||
mkdir -p "$CHEZDIR/home/.gen"
|
||||
echo "{
|
||||
\"disp_pri\": \"HDMI-0\",
|
||||
\"disp_sec\": \"HDMI-0\"
|
||||
}" > "$CHEZDIR/home/.gen/i3.json"
|
||||
|
||||
# initialize chezmoi
|
||||
chezmoi init
|
||||
|
||||
# first chezmoi apply
|
||||
chezmoi apply
|
||||
|
||||
# reboot!
|
||||
read -p "You should reboot, but I won't make you. Reboot? " -n 1 -r
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo reboot
|
||||
|
32
provision/void/readme.md
Normal file
32
provision/void/readme.md
Normal file
@ -0,0 +1,32 @@
|
||||
# Dotfiles
|
||||
> My dotfiles... What do you want?
|
||||
|
||||
My personal dotfiles repo. Documentation is pretty spotty. Maybe I'll fix that someday, but I probably won't.
|
||||
|
||||
## Usage
|
||||
|
||||
Dotfiles are managed with chezmoi and Ansible (built for Void) is used for the bulk of configuration.
|
||||
|
||||
## Initial Setup
|
||||
|
||||
Install Void with BTRFS and run the following commands:
|
||||
|
||||
```bash
|
||||
sudo xbps-install -Syu -y
|
||||
sudo xbps-install -S vim git chezmoi -y
|
||||
git clone https://github.com/starr-dusT/dotfiles ~/.local/share/chezmoi
|
||||
```
|
||||
|
||||
Copy `.chezmoidata.yaml.example` to `.chezmoidata.yaml` and edit with desired settings then run the following commands:
|
||||
|
||||
```bash
|
||||
~/.local/share/chezmoi/jumpstart.sh
|
||||
```
|
||||
|
||||
After reboot log into window manager and run `linux-monitor`, follow the prompts, reapply chezmoi config, and restart the window manager.
|
||||
|
||||
Perform additional setup found in [additional-setup](additional-setup.md)
|
||||
|
||||
## Update Setup
|
||||
|
||||
`void-update` command updates the system with ansible. Run `void-update -h` for information on usage.
|
Loading…
x
Reference in New Issue
Block a user