mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
update for arch
This commit is contained in:
parent
9ce1165b79
commit
eb70ae0053
227
home/dot_config/sway/config
Normal file
227
home/dot_config/sway/config
Normal file
@ -0,0 +1,227 @@
|
||||
# sway config file (v4)
|
||||
# TODO: add scratchpads (terminal, password manager, discord, task)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#----- VARIABLES
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
set $HOME /home/tstarr
|
||||
|
||||
set $DISP_PRI HDMI-0
|
||||
set $DISP_SEC HDMI-0
|
||||
|
||||
set $BOR_WIDTH 4
|
||||
set $GAP_INNER 4
|
||||
|
||||
set $mod Mod4
|
||||
|
||||
set $tag1 "1:game"
|
||||
set $tag2 "2:dev"
|
||||
set $tag3 "3:web"
|
||||
set $tag4 "4:dev"
|
||||
set $tag5 "5:web"
|
||||
set $tag6 "6:web"
|
||||
set $tag7 "7:web"
|
||||
set $tag8 "8:comm"
|
||||
|
||||
set $e exec sway-msg mode default
|
||||
|
||||
set $mode_power "[r]eboot | [s]hutdown"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#----- COLORS
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# class border bground text indicator child_border
|
||||
client.focused #bd93f9 #bd93f9 #F8F8F2 #bd93f9 #bd93f9
|
||||
client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A
|
||||
client.unfocused #282A36 #282A36 #BFBFBF #282A36 #282A36
|
||||
client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555
|
||||
client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36
|
||||
|
||||
client.background #F8F8F2
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#----- MISC. CONFIGURATION
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
font pango:Google Noto 8.5
|
||||
default_border pixel 3
|
||||
default_floating_border pixel 3
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#----- BINDING WORKSPACE TO DISPLAY
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
workspace $tag1 output $DISP_PRI
|
||||
workspace $tag2 output $DISP_PRI
|
||||
workspace $tag3 output $DISP_PRI
|
||||
workspace $tag4 output $DISP_PRI
|
||||
workspace $tag5 output $DISP_SEC
|
||||
workspace $tag6 output $DISP_SEC
|
||||
workspace $tag7 output $DISP_SEC
|
||||
workspace $tag8 output $DISP_SEC
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#----- CONTAINER GAPS
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# CREATING GAPS BETWEEN THE WINDOWS AND EDGES
|
||||
gaps inner $GAP_INNER
|
||||
gaps outer 0
|
||||
gaps horizontal 0
|
||||
gaps vertical 0
|
||||
gaps top 0
|
||||
gaps bottom 0
|
||||
gaps right 0
|
||||
gaps left 0
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#----- FORCE FLOATING
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
for_window [title="Steam - News"] floating enable
|
||||
for_window [title="Friends List"] floating enable
|
||||
|
||||
for_window [title="Picture-in-Picture"] sticky toggle
|
||||
|
||||
for_window [con_mark="scratch-term"] floating enable, \
|
||||
resize set 800 px 600 px, \
|
||||
move position 880 px 420 px
|
||||
|
||||
for_window [con_mark="scratch-warrior"] floating enable, \
|
||||
resize set 1500 px 800 px, \
|
||||
move position 530 px 320 px
|
||||
|
||||
for_window [class="Blueman-manager"] floating enable, \
|
||||
resize set 1000 px 800 px, \
|
||||
move position 780 px 320 px
|
||||
|
||||
for_window [class="scratch-nb"] floating enable, \
|
||||
resize set 1000 px 800 px, \
|
||||
move position 780 px 320 px
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#----- BINDING APPLICATIONS TO WORKSPACE
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
assign [class="Steam"] "1:game"
|
||||
for_window [class="Steam"] move container to workspace "1:game"
|
||||
for_window [class="discord"] move container to workspace $tag8
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#----- KEY BINDINGS
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# [p]ower commands
|
||||
bindsym $mod+p mode $mode_power
|
||||
mode $mode_power {
|
||||
bindsym s exec loginctl poweroff
|
||||
bindsym r exec loginctl reboot
|
||||
bindsym Escape mode default
|
||||
}
|
||||
|
||||
# [x]utility commands
|
||||
bindsym $mod+x mode utility
|
||||
mode utility {
|
||||
bindsym q exit
|
||||
bindsym r reload
|
||||
bindsym p exec "rofi-rbw", $e
|
||||
# TODO: gamemode (mod+Ctrl+g). Needs script to toggle
|
||||
bindsym Escape mode default
|
||||
}
|
||||
|
||||
# layout commands
|
||||
bindsym $mod+Ctrl+t splitv; layout tabbed
|
||||
bindsym $mod+Ctrl+v layout splitv
|
||||
bindsym $mod+Ctrl+s layout splith
|
||||
bindsym $mod+Ctrl+h resize shrink width 50
|
||||
bindsym $mod+Ctrl+j resize shrink height 50
|
||||
bindsym $mod+Ctrl+k resize grow height 50
|
||||
bindsym $mod+Ctrl+l resize grow width 50
|
||||
bindsym $mod+Ctrl+c move position center
|
||||
|
||||
# program management
|
||||
bindsym $mod+d kill
|
||||
bindsym $mod+f fullscreen toggle
|
||||
bindsym $mod+t floating toggle
|
||||
bindsym $mod+s sticky toggle
|
||||
bindsym $mod+Tab focus mode_toggle
|
||||
floating_modifier $mod
|
||||
|
||||
# spatial container management
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
bindsym $mod+minus split v
|
||||
bindsym $mod+backslash split h
|
||||
|
||||
# workspace management
|
||||
bindsym $mod+1 workspace $tag1
|
||||
bindsym $mod+2 workspace $tag2
|
||||
bindsym $mod+3 workspace $tag3
|
||||
bindsym $mod+4 workspace $tag4
|
||||
bindsym $mod+q workspace $tag5
|
||||
bindsym $mod+w workspace $tag6
|
||||
bindsym $mod+e workspace $tag7
|
||||
bindsym $mod+r workspace $tag8
|
||||
bindsym $mod+Shift+1 move container to workspace $tag1
|
||||
bindsym $mod+Shift+2 move container to workspace $tag2
|
||||
bindsym $mod+Shift+3 move container to workspace $tag3
|
||||
bindsym $mod+Shift+4 move container to workspace $tag4
|
||||
bindsym $mod+Shift+q move container to workspace $tag5
|
||||
bindsym $mod+Shift+w move container to workspace $tag6
|
||||
bindsym $mod+Shift+e move container to workspace $tag7
|
||||
bindsym $mod+Shift+r move container to workspace $tag8
|
||||
|
||||
# audio
|
||||
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume 0 +2%
|
||||
bindsym XF86AudioLowerVolume exec pactl set-sink-volume 0 -2%
|
||||
bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle
|
||||
|
||||
# [o]pen applications
|
||||
bindsym $mod+Return exec alacritty
|
||||
bindsym $mod+a exec rofi -show drun -show-icons
|
||||
bindsym $mod+Shift+a exec rofi -show window -show-icons
|
||||
bindsym $mod+o mode open
|
||||
mode open {
|
||||
bindsym b exec flatpak run org.mozilla.firefox, $e
|
||||
bindsym s exec steam, $e
|
||||
bindsym d exec flatpak run com.discordapp.Discord, $e
|
||||
bindsym Escape mode default
|
||||
}
|
||||
|
||||
# s[c]ratchpads commands
|
||||
bindsym $mod+c mode scratch
|
||||
mode scratch {
|
||||
bindsym Return exec $HOME/.config/sway/scripts/scratch.sh \
|
||||
'scratch-term' 'alacritty', $e
|
||||
bindsym n exec $HOME/.config/sway/scripts/scratch.sh \
|
||||
'scratch-nb' 'alacritty -e tmuxinator start nb', $e
|
||||
bindsym t exec $HOME/.config/sway/scripts/scratch.sh \
|
||||
'scratch-warrior' 'alacritty -e tmuxinator start task', $e
|
||||
bindsym Escape mode default
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#----- AUTOSTART WITH I3
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
exec --no-startup-id "autorandr --change && sway-msg restart"
|
||||
exec --no-startup-id "pipewire & pipewire-pulse &"
|
||||
exec --no-startup-id "udiskie &"
|
||||
exec_always --no-startup-id "$HOME/.config/sway/scripts/autolayout.sh"
|
||||
exec_always --no-startup-id "$HOME/.config/sway/scripts/polybar.sh"
|
||||
exec_always --no-startup-id "blueman-applet"
|
||||
exec_always --no-startup-id "nm-applet"
|
||||
exec_always --no-startup-id "flameshot"
|
||||
exec_always --no-startup-id "xsetroot -solid '#282A36'"
|
||||
exec_always --no-startup-id "dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK"
|
||||
|
||||
seat seat0 xcursor_theme default 24
|
||||
exec waybar
|
25
home/dot_config/sway/scripts/executable_autolayout.sh
Normal file
25
home/dot_config/sway/scripts/executable_autolayout.sh
Normal file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import i3ipc
|
||||
|
||||
i3 = i3ipc.Connection()
|
||||
|
||||
def on_window_event(i3, e):
|
||||
focused_container = i3.get_tree().find_focused().parent
|
||||
# Get parent layout of focused window
|
||||
parent_layout = focused_container.layout
|
||||
# Get number of windows in focues container
|
||||
num_parent_windows = len(focused_container.nodes)
|
||||
# Get number of windows in workspace
|
||||
workspace = i3.get_tree().find_focused().workspace()
|
||||
num_workspace_windows = len(workspace.leaves())
|
||||
if num_parent_windows > 1 and parent_layout != "tabbed":
|
||||
i3.command("splitv; layout tabbed")
|
||||
elif num_workspace_windows == 1:
|
||||
i3.command("layout splith")
|
||||
|
||||
# Subscribe to window events
|
||||
i3.on("window", on_window_event)
|
||||
|
||||
# Start the main loop
|
||||
i3.main()
|
11
home/dot_config/sway/scripts/executable_clipmenud.sh
Normal file
11
home/dot_config/sway/scripts/executable_clipmenud.sh
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Terminate already running bar instances
|
||||
pkill clipmenud
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -x clipmenud >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch clipmenud
|
||||
clipmenud &
|
10
home/dot_config/sway/scripts/executable_polybar.sh
Normal file
10
home/dot_config/sway/scripts/executable_polybar.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Terminate already running bar instances
|
||||
pkill polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch polybar
|
||||
polybar -c /home/tstarr/.config/polybar/dracula &
|
34
home/dot_config/sway/scripts/executable_scratch.sh
Normal file
34
home/dot_config/sway/scripts/executable_scratch.sh
Normal file
@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "Usage: "${0}" <i3_mark> <launch_cmd>"
|
||||
echo "Example: ${0} 'scratch-emacs' 'emacsclient -c -a emacs'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
I3_MARK=${1}
|
||||
LAUNCH_CMD=${2}
|
||||
|
||||
scratchpad_show() {
|
||||
i3-msg "[con_mark=${I3_MARK}]" scratchpad show
|
||||
}
|
||||
|
||||
# try showing the scratchpad window
|
||||
if ! scratchpad_show; then
|
||||
# if there is no such window...
|
||||
|
||||
# launch the application.
|
||||
eval "${LAUNCH_CMD}" &
|
||||
|
||||
# Wait for the next window event.
|
||||
i3-msg -t subscribe '[ "window" ]'
|
||||
|
||||
# Set a mark
|
||||
i3-msg mark ${I3_MARK}
|
||||
|
||||
# Move it to the scratchpad workspace
|
||||
i3-msg move scratchpad
|
||||
|
||||
# show the scratchpad window
|
||||
scratchpad_show
|
||||
fi
|
27
home/dot_config/sway/scripts/executable_tabfocus.sh
Normal file
27
home/dot_config/sway/scripts/executable_tabfocus.sh
Normal file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import i3ipc
|
||||
import sys
|
||||
|
||||
move_normal = {"h": "focus left",
|
||||
"j": "focus down",
|
||||
"k": "focus up",
|
||||
"l": "focus right"}
|
||||
|
||||
move_tabbed = {"h": "focus parent; focus left",
|
||||
"j": "focus right",
|
||||
"k": "focus left",
|
||||
"l": "focus parent; focus right"}
|
||||
|
||||
i3 = i3ipc.Connection()
|
||||
|
||||
# Get the focused container
|
||||
focused = i3.get_tree().find_focused()
|
||||
|
||||
# Get the layout of the parent container
|
||||
layout = focused.parent.layout
|
||||
|
||||
if layout == "tabbed":
|
||||
i3.command(move_tabbed[sys.argv[1]])
|
||||
else:
|
||||
i3.command(move_normal[sys.argv[1]])
|
@ -106,6 +106,8 @@ export EDITOR=nvim
|
||||
# For a full list of active aliases, run `alias`.
|
||||
#
|
||||
|
||||
alias ssway='export WLR_NO_HARDWARE_CURSORS=1 && sway --unsupported-gpu'
|
||||
|
||||
# tmuxinator
|
||||
alias tsplat='tmuxinator start splat'
|
||||
alias tdot='tmuxinator start dot'
|
||||
|
186
provision/arch/additional-setup.md
Normal file
186
provision/arch/additional-setup.md
Normal file
@ -0,0 +1,186 @@
|
||||
# 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 virt-manager setup should usually be avoided by transfering the VM between
|
||||
machines. The `patch.rom` required for my GPU is included in my repo.
|
||||
|
||||
## 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.
|
||||
|
||||
## Rofi for wayland
|
||||
|
||||
Rofi doesn't work by default on wayland.
|
||||
|
||||
```bash
|
||||
sudo pacman -S meson
|
||||
# Use wayland branch
|
||||
git clone https://github.com/lbonn/rofi.git
|
||||
cd rofi
|
||||
meson setup build
|
||||
ninja -C build
|
||||
sudo ninja -C build install
|
||||
```
|
1
provision/arch/ansible/hosts
Normal file
1
provision/arch/ansible/hosts
Normal file
@ -0,0 +1 @@
|
||||
local ansible_connection=local ansible_python_interpreter=/usr/bin/python
|
8
provision/arch/ansible/requirements.yml
Normal file
8
provision/arch/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/arch/ansible/setup.yml
Normal file
13
provision/arch/ansible/setup.yml
Normal file
@ -0,0 +1,13 @@
|
||||
- name: Ansible playbook to setup arch 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/arch/ansible/tasks/desktop/_main.yml
Normal file
7
provision/arch/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/arch/ansible/tasks/desktop/configs.yml
Normal file
41
provision/arch/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
|
||||
pacman:
|
||||
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"
|
26
provision/arch/ansible/tasks/desktop/packages.yml
Normal file
26
provision/arch/ansible/tasks/desktop/packages.yml
Normal file
@ -0,0 +1,26 @@
|
||||
- name: Install desktop arch packages
|
||||
pacman:
|
||||
name:
|
||||
- alacritty # Cross-platform, GPU-accelerated terminal emulator
|
||||
- mpv # Video player based on MPlayer/mplayer2
|
||||
- ffmpeg # Decoding, encoding and streaming software
|
||||
- nvidia # NVIDIA drivers for linux - Libraries and Utilities
|
||||
- nvidia-utils
|
||||
- lib32-nvidia-utils
|
||||
- firefox # Mozilla Firefox web browser
|
||||
#- nerd-fonts # Iconic font aggregator, collection and patcher
|
||||
- sway
|
||||
-
|
||||
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
|
||||
state: present
|
||||
become: true
|
4
provision/arch/ansible/tasks/development/_main.yml
Normal file
4
provision/arch/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/arch/ansible/tasks/development/configs.yml
Normal file
5
provision/arch/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
|
32
provision/arch/ansible/tasks/development/packages.yml
Normal file
32
provision/arch/ansible/tasks/development/packages.yml
Normal file
@ -0,0 +1,32 @@
|
||||
- name: Install development void packages
|
||||
pacman:
|
||||
name:
|
||||
- python # 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
|
||||
- lazygit # Simple terminal UI for git commands
|
||||
- python-pipenv # Python Development Workflow for Humans
|
||||
- ruby
|
||||
- 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
|
||||
|
||||
- name: Install development flatpaks
|
||||
flatpak:
|
||||
name:
|
||||
- com.vscodium.codium # Free/Libre Open Source Software Binaries of VS Code
|
||||
state: present
|
||||
become: true
|
2
provision/arch/ansible/tasks/engineering/_main.yml
Normal file
2
provision/arch/ansible/tasks/engineering/_main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
7
provision/arch/ansible/tasks/engineering/packages.yml
Normal file
7
provision/arch/ansible/tasks/engineering/packages.yml
Normal file
@ -0,0 +1,7 @@
|
||||
- name: Install engineering arch packages
|
||||
pacman:
|
||||
name:
|
||||
- freecad # General purpose 3D CAD modeler
|
||||
- superslicer
|
||||
state: present
|
||||
become: true
|
2
provision/arch/ansible/tasks/gaming/_main.yml
Normal file
2
provision/arch/ansible/tasks/gaming/_main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
- import_tasks: packages.yml
|
||||
tags: ["packages"]
|
9
provision/arch/ansible/tasks/gaming/packages.yml
Normal file
9
provision/arch/ansible/tasks/gaming/packages.yml
Normal file
@ -0,0 +1,9 @@
|
||||
- name: Install gaming arch packages
|
||||
pacman:
|
||||
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
|
16
provision/arch/ansible/tasks/include/download-github-bin.yml
Normal file
16
provision/arch/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/arch/ansible/tasks/include/hide-desktop.yml
Normal file
18
provision/arch/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/arch/ansible/tasks/include/xbps-src.yml
Normal file
33
provision/arch/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/arch/ansible/tasks/system/_main.yml
Normal file
4
provision/arch/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/arch/ansible/tasks/system/configs.yml
Normal file
20
provision/arch/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
|
31
provision/arch/ansible/tasks/system/packages.yml
Normal file
31
provision/arch/ansible/tasks/system/packages.yml
Normal file
@ -0,0 +1,31 @@
|
||||
- name: Install system arch 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
|
||||
- libfreeaptx # 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
|
||||
- cargo
|
||||
- chezmoi
|
||||
- linux
|
||||
- linux-headers
|
||||
- linux-zen
|
||||
- linux-zen-headers
|
||||
- base-devel
|
||||
- ttf-jetbrains-mono-nerd
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- 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/arch/ansible/tasks/terminal/_main.yml
Normal file
4
provision/arch/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/arch/ansible/tasks/terminal/configs.yml
Normal file
12
provision/arch/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 }}
|
||||
|
29
provision/arch/ansible/tasks/terminal/packages.yml
Normal file
29
provision/arch/ansible/tasks/terminal/packages.yml
Normal file
@ -0,0 +1,29 @@
|
||||
- name: Install terminal arch packages
|
||||
pacman:
|
||||
name:
|
||||
- neovim # Vim-fork focused on extensibility and agility
|
||||
- task # Command-line TODO list manager
|
||||
- taskwarrior-tui
|
||||
- timew # Timewarrior tracks and reports time
|
||||
- python-tasklib # Library for interacting with taskwarrior databases
|
||||
- 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
|
54
provision/arch/jumpstart.sh
Executable file
54
provision/arch/jumpstart.sh
Executable file
@ -0,0 +1,54 @@
|
||||
#!/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 -S python python-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/arch/ansible/requirements.yml"
|
||||
|
||||
# Run setup playbook
|
||||
ansible-playbook "$CHEZDIR/provision/arch/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/arch/readme.md
Normal file
33
provision/arch/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.
|
Loading…
x
Reference in New Issue
Block a user