mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
update for debian
This commit is contained in:
parent
e0708c3c8a
commit
29545a8449
@ -1,5 +1,3 @@
|
||||
{{- $i3:= include ".gen/i3.json" | mustFromJson -}}
|
||||
|
||||
# i3 config file (v4)
|
||||
# TODO: add scratchpads (terminal, password manager, discord, task)
|
||||
# Test a edit!
|
||||
@ -8,10 +6,10 @@
|
||||
#----- VARIABLES
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
set $HOME {{ .chezmoi.homeDir }}
|
||||
set $HOME /home/tstarr
|
||||
|
||||
set $DISP_PRI {{ $i3.disp_pri }}
|
||||
set $DISP_SEC {{ $i3.disp_sec }}
|
||||
set $DISP_PRI HDMI-0
|
||||
set $DISP_SEC DP-3
|
||||
|
||||
set $BOR_WIDTH 4
|
||||
set $GAP_INNER 4
|
@ -1,10 +0,0 @@
|
||||
local wk = require("which-key")
|
||||
|
||||
require("oil").setup()
|
||||
|
||||
wk.register({
|
||||
o = {
|
||||
name = "+oil",
|
||||
o = { function() require("oil").open() end, "Open Oil" }
|
||||
},
|
||||
}, { prefix = "<leader>" })
|
@ -46,6 +46,6 @@ return require('packer').startup(function(use)
|
||||
|
||||
use('loctvl842/monokai-pro.nvim')
|
||||
require("monokai-pro").setup()
|
||||
use('stevearc/oil.nvim')
|
||||
use('nvim-tree/nvim-tree.lua')
|
||||
use('mcchrish/nnn.vim')
|
||||
end)
|
||||
|
@ -47,6 +47,7 @@ alias ttask='tmuxinator start task'
|
||||
alias cc="cd ~/.local/share/chezmoi"
|
||||
alias cdr="chezmoi apply --verbose --dry-run"
|
||||
alias ca="chezmoi apply"
|
||||
alias ce='chezmoi edit'
|
||||
|
||||
# trashcli
|
||||
alias rm='echo "This is not the command you are looking for."; false'
|
||||
|
3
provision/debian/TODO.md
Normal file
3
provision/debian/TODO.md
Normal file
@ -0,0 +1,3 @@
|
||||
# TODO
|
||||
- Add nmcli pivpn file for wireguard with encrypt with chezmoi
|
||||
- Create way to activate/deactivate VPN (with notification) in sway
|
115
provision/debian/additional-setup.md
Normal file
115
provision/debian/additional-setup.md
Normal file
@ -0,0 +1,115 @@
|
||||
# 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.
|
1
provision/debian/ansible/hosts
Normal file
1
provision/debian/ansible/hosts
Normal file
@ -0,0 +1 @@
|
||||
local ansible_connection=local ansible_python_interpreter=/usr/bin/python3
|
8
provision/debian/ansible/requirements.yml
Normal file
8
provision/debian/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/debian/ansible/setup.yml
Normal file
13
provision/debian/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
|
9
provision/debian/ansible/tasks/desktop/_main.yml
Normal file
9
provision/debian/ansible/tasks/desktop/_main.yml
Normal file
@ -0,0 +1,9 @@
|
||||
- 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"
|
64
provision/debian/ansible/tasks/desktop/configs.yml
Normal file
64
provision/debian/ansible/tasks/desktop/configs.yml
Normal file
@ -0,0 +1,64 @@
|
||||
- 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
|
@ -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"
|
23
provision/debian/ansible/tasks/desktop/packages.yml
Normal file
23
provision/debian/ansible/tasks/desktop/packages.yml
Normal file
@ -0,0 +1,23 @@
|
||||
- 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
|
23
provision/debian/ansible/tasks/desktop/sway.yml
Normal file
23
provision/debian/ansible/tasks/desktop/sway.yml
Normal file
@ -0,0 +1,23 @@
|
||||
- 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
|
4
provision/debian/ansible/tasks/development/_main.yml
Normal file
4
provision/debian/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/debian/ansible/tasks/development/configs.yml
Normal file
5
provision/debian/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
|
37
provision/debian/ansible/tasks/development/packages.yml
Normal file
37
provision/debian/ansible/tasks/development/packages.yml
Normal file
@ -0,0 +1,37 @@
|
||||
- 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
|
2
provision/debian/ansible/tasks/engineering/_main.yml
Normal file
2
provision/debian/ansible/tasks/engineering/_main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
9
provision/debian/ansible/tasks/engineering/packages.yml
Normal file
9
provision/debian/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]"
|
4
provision/debian/ansible/tasks/gaming/_main.yml
Normal file
4
provision/debian/ansible/tasks/gaming/_main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
||||
- import_tasks: yuzu.yml
|
||||
tags: ["packages"]
|
16
provision/debian/ansible/tasks/gaming/packages.yml
Normal file
16
provision/debian/ansible/tasks/gaming/packages.yml
Normal file
@ -0,0 +1,16 @@
|
||||
- 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
|
7
provision/debian/ansible/tasks/gaming/yuzu.yml
Normal file
7
provision/debian/ansible/tasks/gaming/yuzu.yml
Normal file
@ -0,0 +1,7 @@
|
||||
- name: Install yuzu
|
||||
include_tasks: ../include/download-github-bin.yml
|
||||
loop:
|
||||
- user: pineappleEA
|
||||
repo: pineapple-src
|
||||
regex: "Linux-Yuzu-EA-[0-9]"
|
||||
name: Yuzu
|
@ -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: /home/{{ user }}/.local/bin
|
||||
remote_src: true
|
||||
loop_control:
|
||||
loop_var: asset
|
||||
become: true
|
@ -0,0 +1,21 @@
|
||||
- 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
|
18
provision/debian/ansible/tasks/include/hide-desktop.yml
Normal file
18
provision/debian/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/debian/ansible/tasks/include/xbps-src.yml
Normal file
33
provision/debian/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
|
6
provision/debian/ansible/tasks/system/_main.yml
Normal file
6
provision/debian/ansible/tasks/system/_main.yml
Normal file
@ -0,0 +1,6 @@
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
||||
- import_tasks: fonts.yml
|
||||
tags: ["packages"]
|
||||
- import_tasks: configs.yml
|
||||
tags: ["configs"]
|
26
provision/debian/ansible/tasks/system/configs.yml
Normal file
26
provision/debian/ansible/tasks/system/configs.yml
Normal file
@ -0,0 +1,26 @@
|
||||
- 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
|
14
provision/debian/ansible/tasks/system/fonts.yml
Normal file
14
provision/debian/ansible/tasks/system/fonts.yml
Normal file
@ -0,0 +1,14 @@
|
||||
- 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
|
51
provision/debian/ansible/tasks/system/packages.yml
Normal file
51
provision/debian/ansible/tasks/system/packages.yml
Normal file
@ -0,0 +1,51 @@
|
||||
- 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
|
6
provision/debian/ansible/tasks/terminal/_main.yml
Normal file
6
provision/debian/ansible/tasks/terminal/_main.yml
Normal file
@ -0,0 +1,6 @@
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
||||
- import_tasks: configs.yml
|
||||
tags: ["configs"]
|
||||
- import_tasks: nnn.yml
|
||||
tags: ["packages"]
|
12
provision/debian/ansible/tasks/terminal/configs.yml
Normal file
12
provision/debian/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 }}
|
||||
|
27
provision/debian/ansible/tasks/terminal/nnn.yml
Normal file
27
provision/debian/ansible/tasks/terminal/nnn.yml
Normal file
@ -0,0 +1,27 @@
|
||||
- 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)"
|
37
provision/debian/ansible/tasks/terminal/packages.yml
Normal file
37
provision/debian/ansible/tasks/terminal/packages.yml
Normal file
@ -0,0 +1,37 @@
|
||||
- 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
|
47
provision/debian/jumpstart.sh
Executable file
47
provision/debian/jumpstart.sh
Executable file
@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo -e "Starting initial setup for Debian..."
|
||||
|
||||
CHEZDIR="$HOME/.local/share/chezmoi"
|
||||
echo "Input email for bitwarden:"
|
||||
read bitemail
|
||||
|
||||
# Install ansible python dependencies
|
||||
sudo apt update -y
|
||||
sudo apt install chezmoi python3 pipx ansible cargo -y
|
||||
pipx 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/debian/ansible/requirements.yml"
|
||||
|
||||
# Run setup playbook
|
||||
ansible-playbook "$CHEZDIR/provision/debian/ansible/setup.yml" -i "$CHEZDIR/provision/debian/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
|
80
provision/debian/readme.md
Normal file
80
provision/debian/readme.md
Normal file
@ -0,0 +1,80 @@
|
||||
# Provision Debian
|
||||
> \*Installs Debian from behind paywall...\*
|
||||
|
||||
Jumpstart scripts to install Debian with packages and configs I use.
|
||||
|
||||
## Usage
|
||||
|
||||
1. Install Debian with "Expert" installer. Partition drives with gui as follows:
|
||||
|
||||
| Name | Type | Mount Point | Size |
|
||||
|------|----------------------|-------------|--------------|
|
||||
| EFI | EFI system partition | /boot/efi | 512MB |
|
||||
| root | btrfs | / | rest of disk |
|
||||
|
||||
2. Complete installation until the "Install the base system" step.
|
||||
|
||||
3. Switch to a tty and run the following commands:
|
||||
```bash
|
||||
umount /target/boot/efi
|
||||
umount /target
|
||||
mount /dev/sdaY /mnt
|
||||
cd /mnt && mv @rootfs @
|
||||
btrfs subvolume create @home
|
||||
btrfs subvolume create @snapshots
|
||||
btrfs subvolume create @home_snapshots
|
||||
btrfs subvolume create @var
|
||||
btrfs subvolume create @tmp
|
||||
mount -o rw,noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@ /dev/sdaY /target
|
||||
mkdir -p /target/boot/efi
|
||||
mkdir -p /target/home
|
||||
mkdir -p /target/snapshots
|
||||
mkdir -p /target/var
|
||||
mkdir -p /target/tmp
|
||||
mount /dev/sdaX /target/boot/efi
|
||||
mount -o rw,noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@home /dev/sdaY /target/home
|
||||
mount -o rw,noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@snapshots /dev/sdaY /target/snapshots
|
||||
mount -o rw,noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@var /dev/sdaY /target/var
|
||||
mount -o rw,noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@tmp /dev/sdaY /target/tmp
|
||||
mkdir -p /target/home/snapshots
|
||||
mount -o rw,noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@home_snapshots /dev/sdaY /target/home/snapshots
|
||||
```
|
||||
|
||||
5. Edit fstab to mount items from step 4.
|
||||
|
||||
6. Switch back to gui install and complete install.
|
||||
|
||||
7. Reboot and edit `/etc/apt/sources.list` to have these sources:
|
||||
```
|
||||
deb http://ftp.us.debian.org/debian/ sid main contrib non-free non-free-firmware
|
||||
deb-src http://ftp.us.debian.org/debian/ sid main contrib non-free non-free-firmware
|
||||
```
|
||||
|
||||
Then run the following commands:
|
||||
```bash
|
||||
sudo apt-get update
|
||||
sudo apt-get dist-upgrade
|
||||
sudo apt-get autoremove
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
8. Install zram with the `sudo apt install zram-tools` and edit `/etc/defaults/zramswap` and uncomment `PERCENT=25`.
|
||||
|
||||
9. Run the following commands:
|
||||
|
||||
```bash
|
||||
sudo apt 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
|
||||
|
||||
`linux-update --debian` command updates the system with ansible. Run `linux-update -h` for information on usage.
|
3
provision/fedora/TODO.md
Normal file
3
provision/fedora/TODO.md
Normal file
@ -0,0 +1,3 @@
|
||||
# TODO
|
||||
- Add nmcli pivpn file for wireguard with encrypt with chezmoi
|
||||
- Create way to activate/deactivate VPN (with notification) in sway
|
@ -4,12 +4,13 @@
|
||||
- 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
|
||||
#- name: Install gaming flatpaks
|
||||
# flatpak:
|
||||
# name:
|
||||
# - com.valvesoftware.Steam
|
||||
# state: present
|
||||
# become: true
|
||||
|
@ -1,18 +0,0 @@
|
||||
# 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
|
Loading…
x
Reference in New Issue
Block a user