Full send commit (funny joke) to NixOS

This commit is contained in:
Tyler Starr 2023-10-09 16:01:18 -07:00
parent 3743922fb0
commit 0d6c523782
115 changed files with 3 additions and 1480 deletions

View File

@ -2,7 +2,7 @@
# https://github.com/starr-dusT/dotfiles
# nixos
alias nu="cd ~/.local/share/chezmoi/provision/nixos && \
alias nu="cd ~/.local/share/chezmoi/provision && \
sudo nixos-rebuild switch --flake .#$(hostname) && \
cd -"
# sway

View File

@ -1,148 +0,0 @@
# Additional Setup
The following documents some Arch setup that wasn't automated with ansible.
## Wireguard Client [x]
Wireguard is nice for a home vpn and [pivpn](https://pivpn.io/) makes it easy.
Currently my scripts for controlling (and visualizing the state of the vpn)
assume the connection name for the vpn is the same as the hostname of the system.
This may need to be modified in the future if I end up needing multiple vpn
connections.
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
4. Connect to vpn with `nmcli connection up <vpn connection name>
## Mount network drives [x]
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 [x]
[taskopen](https://github.com/jschlatow/taskopen) 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.
## 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 [x]
Transfer the `.mozilla` folder from install-to-install to maintain Firefox
settings and configurations.
## 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`
## AUR Helper [x]
I install the absolute minimum number of AUR packages (and I don't automate
thier installation). Run the following to install:
```bash
git clone https://aur.archlinux.org/yay-git.git
cd yay
makepkg -si
```
I usually install the following packages:
1. Google Earth
2. Google Chrome (I like baseball)
## Yuzu [x]
Copy over the `~/.config/yuzu` and `~/.local/share/yuzu` from prior install.
## Themeing (is that a word?)
### Alacritty
TODO
### ZSH
TODO
### Sway
TODO
### GTK Theme [x]
Set the GTK theme to `dracula` within the gnome-tweaks application.

View File

@ -1 +0,0 @@
local ansible_connection=local ansible_python_interpreter=/usr/bin/python3

View File

@ -1,7 +0,0 @@
# Ansible Galaxy Roles
roles:
- src: https://github.com/starr-dusT/ansible-rustup
collections:
- name: community.general
version: 6.0.1
source: https://galaxy.ansible.com

View File

@ -1,13 +0,0 @@
- name: Ansible playbook to setup Arch
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

View File

@ -1,6 +0,0 @@
- import_tasks: packages.yml
tags: ["packages"]
- import_tasks: sway.yml
tags: ["packages"]
- import_tasks: configs.yml
tags: ["configs"]

View File

@ -1,49 +0,0 @@
- 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: Delete amd vulkan files
# ansible.builtin.file:
# state: absent
# path:
# - /usr/share/vulkan/icd.d/amd_icd32.json
# - /usr/share/vulkan/icd.d/amd_icd64.json
- name: Start and enable bluetooth
tags: ["once"]
systemd:
name: bluetooth
enabled: true
state: started
become: true
- name: Start and enable virtualization
tags: ["once"]
systemd:
name: libvirtd
enabled: true
state: started
become: true

View File

@ -1,21 +0,0 @@
- name: Install desktop packages
pacman:
name:
- mpv # Video player based on MPlayer/mplayer2
- ffmpeg # Decoding, encoding and streaming software
- firefox
- gnome-tweaks
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
- org.kde.kdenlive
- com.bitwarden.desktop
state: present
become: true

View File

@ -1,23 +0,0 @@
- name: Install sway packages
pacman:
name:
- alacritty
- sway
- swayidle
- swaybg
- grim # screenshot functionality
- wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
- mako # notification system developed by swaywm maintainer
- pcmanfm
- blueman
- flameshot
- playerctl
- xorg-xwayland
- bc # needed for my sway status script
- python-i3ipc
state: present
become: true
- name: Install sway cargo packages
community.general.cargo:
name: sway-scratchpad

View File

@ -1,2 +0,0 @@
- import_tasks: packages.yml
tags: ["packages"]

View File

@ -1,33 +0,0 @@
- name: Install development packages
pacman:
name:
- python3 # Python programming language (3.11 series)
- python-pip # A tool for installing and managing Python3 packages
- ipython
- ripgrep # Fast search tool inspired by ag and grep
- fd # Simple, fast and user-friendly alternative to find
- python-pipenv # Python Development Workflow for Humans
- cloc
state: present
become: true
- name: Install development python packages
ansible.builtin.pip:
name:
- ansible-lint # Command-line tool for linting playbooks, roles and collections
- pyright
- tmuxp
- name: Install lazygit
include_tasks: ../include/download-github-archive.yml
loop:
- user: jesseduffield
repo: lazygit # Simple terminal UI for git commands
regex: Linux_x86_64.tar.gz
- name: Install development flatpaks
flatpak:
name:
- com.vscodium.codium # Free/Libre Open Source Software Binaries of VS Code
state: present
become: true

View File

@ -1,2 +0,0 @@
- import_tasks: packages.yml
tags: ["packages"]

View File

@ -1,9 +0,0 @@
- name: Install engineering packages
pacman:
name:
- freecad # General purpose 3D CAD modeler
- gqrx
state: present
become: true
- include_tasks: superslicer.yml # PrusaSlicer fork (which is a slic3r fork)

View File

@ -1,6 +0,0 @@
- name: Install SuperSlicer
include_tasks: ../include/download-github-bin.yml
loop:
- user: supermerill
repo: SuperSlicer
regex: "SuperSlicer-ubuntu_18.04-[0-9]"

View File

@ -1,4 +0,0 @@
- import_tasks: packages.yml
tags: ["packages"]
- import_tasks: yuzu.yml
tags: ["packages"]

View File

@ -1,9 +0,0 @@
- name: Install gaming packages
pacman:
name:
- lutris # Video game preservation platform
- gamemode # Optimize system performance for games on demand
- wine # A compatibility layer for windows applications
- steam
state: present
become: true

View File

@ -1,7 +0,0 @@
- name: Install yuzu
include_tasks: ../include/download-github-bin.yml
loop:
- user: pineappleEA
repo: pineapple-src
regex: "Linux-Yuzu-EA-[0-9]"
name: Yuzu

View File

@ -1,16 +0,0 @@
- 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: /home/{{ user }}/.local/bin
remote_src: true
loop_control:
loop_var: asset
become: true

View File

@ -1,21 +0,0 @@
- 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: /home/{{ user }}/.local/bin/{{ item.repo }}
mode: 0775
when: item.name is not defined
get_url:
url: "{{ asset.browser_download_url }}"
dest: /home/{{ user }}/.local/bin/{{ item.name }}
mode: 0775
when: item.name is defined
loop_control:
loop_var: asset

View File

@ -1,18 +0,0 @@
- 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

View File

@ -1,6 +0,0 @@
- import_tasks: packages.yml
tags: ["packages"]
- import_tasks: fonts.yml
tags: ["packages"]
- import_tasks: configs.yml
tags: ["configs"]

View File

@ -1,43 +0,0 @@
- 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
- name: Add user to libvirt group
tags: ["once"]
shell: |
usermod -a -G libvirt {{ user }}
become: true
- name: Start and enable dbus-broker
tags: ["once"]
systemd:
name: dbus-broker
enabled: true
state: started
become: true
- name: Start and enable dbus-broker globally
tags: ["once"]
systemd:
name: dbus-broker
scope: global
enabled: true
state: started
become: true

View File

@ -1,21 +0,0 @@
- name: Create font directory
file:
path: /home/{{ user }}/.local/share/fonts
state: directory
- name: Download JetBrainsMono Font
ansible.builtin.unarchive:
src: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.1/JetBrainsMono.zip
dest: /home/{{ user }}/.local/share/fonts
remote_src: yes
- name: Update font cache
shell: |
fc-cache -fv
- name: Install Noto Fonts for Emojis
pacman:
name:
- noto-fonts-emoji
state: present
become: true

View File

@ -1,31 +0,0 @@
- name: Install system packages
pacman:
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
- base-devel
- qemu
- virt-manager
- dnsmasq
- iptables
- trash-cli # Command line interface to the freedesktop.org trashcan
- cargo
- borgbackup
- fzf
- unzip
- chezmoi
- dbus-broker
- vulkan-tools
- fuse2
state: present
become: true
- name: Add flatpak remote
ansible.builtin.shell: |
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
become: true

View File

@ -1,6 +0,0 @@
- import_tasks: packages.yml
tags: ["packages"]
- import_tasks: configs.yml
tags: ["configs"]
- import_tasks: nnn.yml
tags: ["packages"]

View File

@ -1,12 +0,0 @@
- 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 }}

View File

@ -1,27 +0,0 @@
- name: Install nnn dependencies
pacman:
name:
- readline
state: present
become: true
- name: Clone nnn repo
ansible.builtin.git:
repo: https://github.com/jarun/nnn.git
dest: /home/{{ user }}/tmp/nnn
- name: Compile nnn
shell: |
make O_NERD=1
args:
chdir: /home/{{ user }}/tmp/nnn
- name: Move nnn to .local bin
copy:
src: /home/{{ user }}/tmp/nnn/nnn
dest: /home/{{ user }}/.local/bin/nnn
mode: a+x
- name: Download nnn plugins
shell: |
sh -c "$(curl -Ls https://raw.githubusercontent.com/jarun/nnn/master/plugins/getplugs)"

View File

@ -1,40 +0,0 @@
- name: Install terminal packages
pacman:
name:
- neovim # Vim-fork focused on extensibility and agility
- task # Command-line TODO list manager
- timew # Timewarrior tracks and reports time
- python-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)
- khal # Command-line calendar build around CalDAV
- khard # Command-line addressbook built around CardDAV
- vdirsyncer # Synchronize calendars and addressbooks
- neofetch # Simple system information script
- python-setuptools
- bashtop
state: present
become: true
- name: Install terminal python packages
ansible.builtin.pip:
name:
- pynvim
- yt-dlp
- 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 KiB

View File

@ -1,50 +0,0 @@
#!/usr/bin/env bash
echo -e "Starting initial setup for Arch..."
CHEZDIR="$HOME/.local/share/chezmoi"
echo "Input email for bitwarden:"
read bitemail
# Install ansible python dependencies
sudo pacman -Syu
sudo pacman -Syu python3 python-pip ansible cargo
sudo find / -name "EXTERNALLY-MANAGED" -type f -delete
pip install pexpect
cargo install rbw
# Add things to path for this script
mkdir -p $HOME/.local/bin
export PATH="$PATH:/usr/local/bin"
export PATH="$PATH:$HOME/.cargo/bin"
export PATH="$PATH:$CHEZDIR/temp_bin"
export PATH="$PATH:$HOME/.local/bin"
# Install ansible extensions
ansible-galaxy install -r "$CHEZDIR/provision/arch/ansible/requirements.yml"
# Run setup playbook
ansible-playbook "$CHEZDIR/provision/arch/ansible/setup.yml" -i "$CHEZDIR/provision/arch/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"
# 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

View File

@ -1,37 +0,0 @@
# Provision Arch
> \*Yes, I haven't showered in days.\*
Jumpstart scripts to install Arch with packages and configs I use.
## Status
:warning: :warning: :warning:
I don't actively use this anymore. This is likely falling into disrepair.
## Usage
1. Install Arch with `archinstall` and the following settings:
![Install Options](https://github.com/starr-dusT/dotfiles/blob/master/provision/arch/install.jpg?raw=true)
2. Edit fstab for btrfs subvolumes to have `rw,noatime,compress=zstd`.
3. Run the following commands:
```bash
sudo pacman -S install vim git
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/provision/arch/jumpstart.sh
```
Perform additional setup found in [additional-setup](additional-setup.md)
## Update
`linux-update --arch` command updates the system with ansible. Run `linux-update -h` for information on usage.

View File

@ -1,3 +0,0 @@
# TODO
- Add nmcli pivpn file for wireguard with encrypt with chezmoi
- Create way to activate/deactivate VPN (with notification) in sway

View File

@ -1,115 +0,0 @@
# Additional Setup
The following documents some Fedora setup that wasn't automated with ansible.
## 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.
## 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.
## 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.
## Google chrome
[Google chrome](https://www.google.com/chrome/) is gross, but I like to watch baseball.
Download the RPM and install with yum.

View File

@ -1 +0,0 @@
local ansible_connection=local ansible_python_interpreter=/usr/bin/python3

View File

@ -1,8 +0,0 @@
# 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

View File

@ -1,13 +0,0 @@
- 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

View File

@ -1,9 +0,0 @@
- import_tasks: packages.yml
tags: ["packages"]
- import_tasks: sway.yml
tags: ["packages"]
- import_tasks: configs.yml
tags: ["configs"]
- import_tasks: gnome-settings/_main.yml
tags: ["configs"]
when: desktop == "gnome"

View File

@ -1,64 +0,0 @@
- 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: Delete amd vulkan files
ansible.builtin.file:
state: absent
path:
- /usr/share/vulkan/icd.d/amd_icd32.json
- /usr/share/vulkan/icd.d/amd_icd64.json
- 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
- name: Start and enable bluetooth
tags: ["once"]
systemd:
name: bluetooth
enabled: true
state: started
become: true
- name: Start and enable virtualization
tags: ["once"]
systemd:
name: libvirtd
enabled: true
state: started
become: true

View File

@ -1,17 +0,0 @@
- 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

View File

@ -1,6 +0,0 @@
- import_tasks: extensions.yml
tags: ["gnome-extensions"]
- import_tasks: keybinds.yml
tags: ["configs"]
- import_tasks: window-management.yml
tags: ["configs"]

View File

@ -1,11 +0,0 @@
- 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 }}"

View File

@ -1,62 +0,0 @@
- 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/']"

View File

@ -1,10 +0,0 @@
- 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"

View File

@ -1,23 +0,0 @@
- name: Install desktop fedora packages
dnf:
name:
- mpv # Video player based on MPlayer/mplayer2
- ffmpeg # Decoding, encoding and streaming software
- firefox # Mozilla Firefox web browser
- 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

View File

@ -1,23 +0,0 @@
- name: Install sway fedora packages
dnf:
name:
- alacritty
- rofi
- sway
- swayidle
- grim # screenshot functionality
- wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
- mako # notification system developed by swaywm maintainer
- wdisplays # tool to configure displays
- rofi
- feh
- pcmanfm
- blueman
- flameshot
- playerctl
state: present
become: true
- name: Install sway cargo packages
community.general.cargo:
name: sway-scratchpad

View File

@ -1,4 +0,0 @@
- import_tasks: packages.yml
tags: ["packages"]
- import_tasks: configs.yml
tags: ["configs"]

View File

@ -1,5 +0,0 @@
- 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

View File

@ -1,37 +0,0 @@
- 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
- cloc
state: present
become: true
- name: Install development python packages
ansible.builtin.pip:
name:
- ansible-lint # Command-line tool for linting playbooks, roles and collections
- pyright
- tmuxp
- 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

View File

@ -1,2 +0,0 @@
- import_tasks: packages.yml
tags: ["packages"]

View File

@ -1,9 +0,0 @@
- 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)

View File

@ -1,6 +0,0 @@
- name: Install SuperSlicer
include_tasks: ../include/download-github-bin.yml
loop:
- user: supermerill
repo: SuperSlicer
regex: "SuperSlicer-ubuntu_18.04-[0-9]"

View File

@ -1,4 +0,0 @@
- import_tasks: packages.yml
tags: ["packages"]
- import_tasks: yuzu.yml
tags: ["packages"]

View File

@ -1,16 +0,0 @@
- name: Install gaming fedora packages
dnf:
name:
- lutris # Video game preservation platform
- gamemode # Optimize system performance for games on demand
- wine # A compatibility layer for windows applications
- steam
state: present
become: true
#- name: Install gaming flatpaks
# flatpak:
# name:
# - com.valvesoftware.Steam
# state: present
# become: true

View File

@ -1,7 +0,0 @@
- name: Install yuzu
include_tasks: ../include/download-github-bin.yml
loop:
- user: pineappleEA
repo: pineapple-src
regex: "Linux-Yuzu-EA-[0-9]"
name: Yuzu

View File

@ -1,16 +0,0 @@
- 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: /home/{{ user }}/.local/bin
remote_src: true
loop_control:
loop_var: asset
become: true

View File

@ -1,21 +0,0 @@
- 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: /home/{{ user }}/.local/bin/{{ item.repo }}
mode: 0775
when: item.name is not defined
get_url:
url: "{{ asset.browser_download_url }}"
dest: /home/{{ user }}/.local/bin/{{ item.name }}
mode: 0775
when: item.name is defined
loop_control:
loop_var: asset

View File

@ -1,18 +0,0 @@
- 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

View File

@ -1,33 +0,0 @@
- 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

View File

@ -1,6 +0,0 @@
- import_tasks: packages.yml
tags: ["packages"]
- import_tasks: fonts.yml
tags: ["packages"]
- import_tasks: configs.yml
tags: ["configs"]

View File

@ -1,26 +0,0 @@
- 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
- name: Add user to libvirt group
tags: ["once"]
shell: |
usermod -a -G libvirt {{ user }}
become: true

View File

@ -1,14 +0,0 @@
- name: Create font directory
file:
path: /home/{{ user }}/.local/share/fonts
state: directory
- name: Download JetBrainsMono Font
ansible.builtin.unarchive:
src: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.1/JetBrainsMono.zip
dest: /home/{{ user }}/.local/share/fonts
remote_src: yes
- name: Update font cache
shell: |
fc-cache -fv

View File

@ -1,51 +0,0 @@
- 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: 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
- borgbackup
- fzf
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

View File

@ -1,6 +0,0 @@
- import_tasks: packages.yml
tags: ["packages"]
- import_tasks: configs.yml
tags: ["configs"]
- import_tasks: nnn.yml
tags: ["packages"]

View File

@ -1,12 +0,0 @@
- 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 }}

View File

@ -1,27 +0,0 @@
- name: Install nnn dependencies
dnf:
name:
- readline-devel
state: present
become: true
- name: Clone nnn repo
ansible.builtin.git:
repo: https://github.com/jarun/nnn.git
dest: /home/{{ user }}/tmp/nnn
- name: Compile nnn
shell: |
make O_NERD=1
args:
chdir: /home/{{ user }}/tmp/nnn
- name: Move nnn to .local bin
copy:
src: /home/{{ user }}/tmp/nnn/nnn
dest: /home/{{ user }}/.local/bin/nnn
mode: a+x
- name: Download nnn plugins
shell: |
sh -c "$(curl -Ls https://raw.githubusercontent.com/jarun/nnn/master/plugins/getplugs)"

View File

@ -1,37 +0,0 @@
- 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)
- 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

View File

@ -1,54 +0,0 @@
#!/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

View File

@ -1,33 +0,0 @@
# Provision Fedora
> \*Tips Fedora\*
Jumpstart scripts to install Fedora with packages and configs I use.
## Status
:warning: :warning: :warning:
I don't actively use this anymore. This is likely falling into disrepair.
## Usage
Install Fedora Workstation with BTRFS and default partitions.
Run the following commands:
```bash
sudo dnf install vim git -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/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.

Some files were not shown because too many files have changed in this diff Show More