Compare commits
214 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a10480c692 | |||
| 00218a447f | |||
| b9d0e31631 | |||
| 5435da309a | |||
| 5ebfa7e8bb | |||
| 712b0b8ffe | |||
| 99cf761528 | |||
| dbb9528f26 | |||
| 0122f086b2 | |||
| 0b878674d3 | |||
| 6e86149f59 | |||
| a2ec622582 | |||
| ab478153ec | |||
| caa7bd9285 | |||
| 19ce3dde3b | |||
| 1bd66a0df9 | |||
| 73a6ea092b | |||
| 85c2a4d4b1 | |||
| 063928ebb8 | |||
| 1679eb2522 | |||
| 65cf20f932 | |||
| a1935588a4 | |||
| 44060a6d1d | |||
| f756182d12 | |||
| b41a381385 | |||
| faddea7492 | |||
| a85cbf277f | |||
| 15a79578e6 | |||
| 57e8824d16 | |||
| f46b0bad96 | |||
| f76b635e40 | |||
| 0fc27e94b0 | |||
| 08fbce5f44 | |||
| 1ea368184d | |||
| 5710f284ba | |||
| b4e8bf6f15 | |||
| e0395dda04 | |||
| 625f4c899f | |||
| f324589c65 | |||
| 3fe18ef9dc | |||
| 57f5473c2f | |||
| e517a8c3e8 | |||
| 751cbbc055 | |||
| 5175b7ff0c | |||
| 6d0b0f52f5 | |||
| 203d8a1ef4 | |||
| c9370553fb | |||
| e3e9418a12 | |||
| 398541fa54 | |||
| e031be406e | |||
| 4c0639e862 | |||
| 07047f140e | |||
| 1493d76352 | |||
| b0a7a03542 | |||
| b8b7ca1851 | |||
| 184ec96395 | |||
| 4adc2d2e7e | |||
| fb4386b418 | |||
| ed2b678228 | |||
| 4ce049b3ea | |||
| d48f6d1572 | |||
| a0582c7483 | |||
| 1917b087c9 | |||
| c2b32c6d3e | |||
| aa0522ee67 | |||
| 04d9498c72 | |||
| 481f8fa5d1 | |||
| a2edee0857 | |||
| a9352773a7 | |||
| 3b1502f6c1 | |||
| 4dba89dba2 | |||
| 69bf1c25fb | |||
| bf4b6951ac | |||
| de29d33042 | |||
| 2de2fb1966 | |||
| 99966ea0c4 | |||
| 90d4a22431 | |||
| 28829018cd | |||
| 62b59f4e8a | |||
| 9010a7dc7c | |||
| e8eb5c68a7 | |||
| 0887a3bdf0 | |||
| 3861f2fad4 | |||
| d8d5f001f2 | |||
| 91996885e9 | |||
| a8d0e2c7bb | |||
| ae20dec6f1 | |||
| 88717f745b | |||
| 1972cd4b9e | |||
| fbc8e62872 | |||
| dac6240b92 | |||
| 3faa49c290 | |||
| d2356a5780 | |||
| 862b36d537 | |||
| e3f2d42017 | |||
| 2b40012443 | |||
| 70114784a5 | |||
| 3823aa438a | |||
| 2f3109d113 | |||
| 7e891fac9d | |||
| a94b8cdd72 | |||
| b1ae3a7587 | |||
| 4f20bdfa1b | |||
| c43e589235 | |||
| f3a3ac63ea | |||
| 4f31769802 | |||
| ab5a35a133 | |||
| faeef04ca4 | |||
| 87f5c39a9a | |||
| bd29c74d21 | |||
| eb70ee7a34 | |||
| 816ff990b3 | |||
| cda28a2c4e | |||
| 1ff0e3624f | |||
| f70ebba7e7 | |||
| ca482245cc | |||
| e4d66c9d33 | |||
| 98cc0c08df | |||
| 27d66493e4 | |||
| 6056038b75 | |||
| 728c68443f | |||
| ddd5693145 | |||
| d6295f8ffe | |||
| 014b9ef105 | |||
| c8973bf074 | |||
| 9cc6be2325 | |||
| f6d9521865 | |||
| 3a53fbb0c6 | |||
| 8d74bee2ff | |||
| 4b359afdd0 | |||
| 465ba8e053 | |||
| edb1db9a9a | |||
| cc22d3e9bd | |||
| 3376d6fef1 | |||
| 654e944da4 | |||
| 5cf45dfeaf | |||
| 1bbb64f38e | |||
| 64a9fc4de1 | |||
| 2d95d3be8f | |||
| 3c9c23736e | |||
| 94ef15e9c7 | |||
| f2ee698fee | |||
| d5aa46dcfd | |||
| c62b6f3b59 | |||
| 2813734dda | |||
| 942bc475e0 | |||
| 28be7abaf1 | |||
| 4f96f32c1c | |||
| 248f352e16 | |||
| 163a649dc7 | |||
| c30490aa1d | |||
| c11d9ec25e | |||
| c3fb8f360f | |||
| ed2535b802 | |||
| fb140bea72 | |||
| 33ef2544dc | |||
| 4b8f122376 | |||
| df6dc122f2 | |||
| b765c5cdae | |||
| 3629d24b1b | |||
| 9339b24808 | |||
| 5e8d188871 | |||
| 4fd3e43e0d | |||
| d8bc4a66cf | |||
| 30f9aff49e | |||
| 190b3d921b | |||
| 11632e72d7 | |||
| fa0ea0098e | |||
| 579764ca76 | |||
| 51b3161124 | |||
| 18a1defd65 | |||
| f7ac9cc7e7 | |||
| c40019a72d | |||
| 2d1f720578 | |||
| 119b8aa669 | |||
| 2b7447ba26 | |||
| e0bb2b3c66 | |||
| e70fdaabd5 | |||
| 4522811da1 | |||
| ec22eacbdb | |||
| 4031be218c | |||
| e280bd7a49 | |||
| 2954ce5af9 | |||
| cd7a290d61 | |||
| 89982bae39 | |||
| 9327ed23ac | |||
| 79a2c832b4 | |||
| 6a36811590 | |||
| 2e0dd78f68 | |||
| 861a9c6257 | |||
| 210e409428 | |||
| 44039bbd1b | |||
| a1bbcdc804 | |||
| 22a74506fd | |||
| 5d7318ec32 | |||
| cf676808c9 | |||
| 66ca4dcb98 | |||
| ea1716957b | |||
| 2e560c9f2b | |||
| c21d7415f5 | |||
| e3c61c5bcd | |||
| af3c665a43 | |||
| 8b52914683 | |||
| b3e9f7584f | |||
| 1a2572870f | |||
| d32c913a40 | |||
| b8fa688e52 | |||
| ea3ce8d023 | |||
| dd7325da39 | |||
| 195c315714 | |||
| b91b43b56d | |||
| a64f2253b6 | |||
| 7f21a0fc7b | |||
| 87aca38811 |
@@ -25,6 +25,19 @@ This has been used as my primary server and workstation OS since at least 2024.
|
||||
The `apt` version of `ansible` in both Bookworm and Trixie are sufficient,
|
||||
no longer need to use `ansible` out of `pip`.
|
||||
|
||||
Stopped using as a workstation on all devices in August 2026.
|
||||
|
||||
#### Devuan (with `runit`)
|
||||
|
||||
2026-07-30: Distribution has beed added with a few caveats.
|
||||
|
||||
- `runit` is the currently the expected init system (not OpenRC or SysVInit)
|
||||
- Mullvad needs installed via .dev file [here]().
|
||||
|
||||
#### Artix Linux (OpenRC or runit)
|
||||
|
||||
2026-07-31: Began experimenting and adapting playbooks using VMs.
|
||||
|
||||
### Secondary
|
||||
|
||||
These are tested via my Docker project's `ProvisionsTests` container but not currently used as daily drivers.
|
||||
@@ -88,14 +101,14 @@ terrible while updating. Ubuntu Rolling Rhino filled the gap.
|
||||
Workstation: 100%,
|
||||
Server: 100%
|
||||
|
||||
## Suse Family
|
||||
### Suse Family
|
||||
|
||||
### openSUSE Tumbleweed v2022-02-17
|
||||
#### openSUSE Tumbleweed v2022-02-17
|
||||
|
||||
Generic: 100%,
|
||||
Workstation: 100%
|
||||
|
||||
### openSUSE Leap 15.4
|
||||
#### openSUSE Leap 15.4
|
||||
|
||||
Generic: 100%
|
||||
Workstation: Currently failing at `[Workstation | Linux | Flatpak Distro | Package Manager | Install From Repo]` with message `Problem: nothing provides libedataserver-1.2.so.24 needed by the to be installed evolution-data-server-32bit-3.34.4-3.3.1.x86_64`.
|
||||
@@ -127,6 +140,8 @@ after update problems due to a long computer hiatus.
|
||||
|
||||
Specifically for the Pinephone.
|
||||
|
||||
## Unsupported
|
||||
|
||||
## Future Goals
|
||||
|
||||
Eventually some of the scripts and install files will be put into the files
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
[defaults]
|
||||
inventory=hosts
|
||||
interpreter_python=auto_silent
|
||||
inject_facts_as_vars=True
|
||||
|
||||
[inventory]
|
||||
localhost_warning=False
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
ntp_server: chrony
|
||||
dig: dig
|
||||
neofetch: neofetch
|
||||
lightdm: lightdm
|
||||
sddm: sddm
|
||||
tmux: tmux
|
||||
base_devel: htop # Placeholder for Arch package.
|
||||
macbook_wifi_driver: broadcom-sta-dkms
|
||||
|
||||
- name: General | Facts | Package | Parrot OS Fixes
|
||||
set_fact:
|
||||
@@ -27,12 +32,8 @@
|
||||
cron: cron
|
||||
encfs: encfs
|
||||
dig: dnsutils
|
||||
when: ansible_pkg_mgr == "apt"
|
||||
|
||||
- name: General | Facts | Package | apt | Debian Trixie
|
||||
set_fact:
|
||||
neofetch: fastfetch
|
||||
when: ansible_pkg_mgr == "apt" and ansible_distribution_release == "trixie"
|
||||
when: ansible_pkg_mgr == "apt"
|
||||
|
||||
- name: General | Facts | Package | pacman
|
||||
set_fact:
|
||||
@@ -42,6 +43,9 @@
|
||||
microcode_intel: intel-ucode
|
||||
cron: cronie
|
||||
encfs: encfs
|
||||
dig: bind
|
||||
base_devel: base-devel
|
||||
macbook_wifi_driver: broadcom-wl-dkms
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
|
||||
- name: General | Facts | Package | FreeBSD
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
# Define file, folder, and other facts per OS.
|
||||
|
||||
- name: General | Facts | System | Global
|
||||
- name: General | Facts | System | Global [1/2]
|
||||
set_fact:
|
||||
lynis_install_dir: /usr/local/src/lynis
|
||||
dwm_install_dir: /usr/local/src/dwm
|
||||
@@ -10,7 +10,14 @@
|
||||
x_desktops: /usr/share/xsessions
|
||||
git_repo_http: https://{{ git_host }}/{{ git_user }}/{{ git_project }}
|
||||
git_repo_ssh: ssh://git@{{ git_host }}:{{ git_ssh_port }}/{{ git_user }}/{{ git_project }}
|
||||
shared_rc_install_dir: ~/.git-env-shared
|
||||
notify_log: "ansible.notify.log"
|
||||
|
||||
- name: General | Facts | System | Global [2/2]
|
||||
set_fact:
|
||||
shared_rc_bin: "{{ shared_rc_install_dir }}/bin-shared"
|
||||
notify_log_file: /var/log/{{ notify_log }}
|
||||
notify_log_file_wip: /tmp/{{ notify_log }}.wip
|
||||
|
||||
- name: General | Facts | System | Linux
|
||||
set_fact:
|
||||
|
||||
@@ -43,11 +43,11 @@
|
||||
when: ansible_distribution == "Ubuntu"
|
||||
|
||||
|
||||
- name: Workstation | Facts | Package | Debian
|
||||
- name: Workstation | Facts | Package | Debian & Devuan
|
||||
set_fact:
|
||||
flatpak_distro: true
|
||||
dmenu: suckless-tools
|
||||
when: ansible_distribution == "Debian"
|
||||
when: ansible_distribution in ("Debian", "Devuan")
|
||||
|
||||
|
||||
- name: Workstation | Facts | Package | Mint
|
||||
@@ -64,13 +64,14 @@
|
||||
when: ansible_distribution == "Parrot OS"
|
||||
|
||||
|
||||
- name: Workstation | Facts | Package | Arch + Manjaro
|
||||
- name: Workstation | Facts | Package | Arch / Manjaro / Artix
|
||||
set_fact:
|
||||
flatpak_distro: true
|
||||
firefox_esr: firefox
|
||||
psutil: python-psutil
|
||||
appimagelauncher: appimagelauncher
|
||||
when: ansible_distribution == "Archlinux"
|
||||
font_awesome: ttf-font-awesome
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
|
||||
|
||||
- name: Workstation | Facts | Package | FreeBSD
|
||||
|
||||
+9
-6
@@ -20,7 +20,7 @@ static const char *colors[][3] = {
|
||||
};
|
||||
|
||||
/* tagging */
|
||||
static const char *tags[] = { "1:", "2:", "3:", "4:", "5:", "6:", "7:", "8:", "9:" };
|
||||
static const char *tags[] = { "1 : ", "2 : ", "3 : ", "4 : ", "5 : ", "6 : ", "7 : ", "8 : ", "9 : " };
|
||||
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
@@ -46,7 +46,7 @@ static const Layout layouts[] = {
|
||||
};
|
||||
|
||||
/* key definitions */
|
||||
#define MODKEY Mod1Mask
|
||||
#define MODKEY Mod4Mask
|
||||
#define TAGKEYS(KEY,TAG) \
|
||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||
@@ -69,13 +69,16 @@ static const char *raisevolcmd[] = {"amixer","-q","sset","Master","1%+",NULL};
|
||||
static Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY, XK_d, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY, XK_b, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY, XK_space, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
||||
{ MODKEY, XK_b, togglebar, {0} },
|
||||
//{ MODKEY, XK_b, togglebar, {0} },
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||
//{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||
{ MODKEY, XK_Return, zoom, {0} },
|
||||
@@ -84,8 +87,8 @@ static Key keys[] = {
|
||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
||||
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
||||
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
|
||||
{ MODKEY, XK_space, setlayout, {0} },
|
||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||
//{ MODKEY, XK_space, setlayout, {0} },
|
||||
//{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
||||
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
|
||||
|
||||
@@ -31,8 +31,8 @@ function volume-usage {
|
||||
EOF
|
||||
return $1
|
||||
}
|
||||
alias volume-help="volume-usage"
|
||||
alias vol-h="volume-help"
|
||||
#alias volume-help="volume-usage"
|
||||
#alias vol-h="volume-help"
|
||||
|
||||
function volume {
|
||||
|
||||
@@ -135,9 +135,9 @@ function volume {
|
||||
echo "$0 $1 $2"
|
||||
return 7
|
||||
}
|
||||
alias vol="volume "
|
||||
alias vol-="volume - "
|
||||
alias vol+="volume + "
|
||||
#alias vol="volume "
|
||||
#alias vol-="volume - "
|
||||
#alias vol+="volume + "
|
||||
|
||||
function volume-display {
|
||||
if [[ "$1" == "-v" || "$1" == "--verbose" || "$1" == "verbose" ]]; then
|
||||
@@ -146,7 +146,7 @@ function volume-display {
|
||||
amixer sget Master | egrep -o '[0-9]{1,3}%' | head -n 1
|
||||
fi
|
||||
}
|
||||
alias "vol-d"="volume-display"
|
||||
#alias "vol-d"="volume-display"
|
||||
|
||||
## TBD/TODO ##
|
||||
|
||||
|
||||
@@ -12,12 +12,16 @@ if [[ -z "$HOSTNAME" ]]; then
|
||||
fi
|
||||
|
||||
EXTRA="$1"
|
||||
TAG="System"
|
||||
DATE="`date "+%Y%m%d-%H%M%S"`"
|
||||
BACKUP_DIR="/srv/backup"
|
||||
BASENAME="Backup"
|
||||
|
||||
TAG="System"
|
||||
BACKUP="$BACKUP_DIR/$BASENAME.$DATE.$HOSTNAME.$TAG.zip"
|
||||
|
||||
TAG2="Data"
|
||||
BACKUP2="${BACKUP//$TAG/$TAG2}"
|
||||
|
||||
## Initialization ##
|
||||
|
||||
echo "*** Creating Backup Directory ***"
|
||||
@@ -31,15 +35,19 @@ sudo chown -Rv root:root "$BACKUP_DIR"
|
||||
echo "*** Removing Old Backups ***"
|
||||
cd "$BACKUP_DIR"
|
||||
sudo mv -v "$BASENAME"*"$TAG"* TRASH/
|
||||
sudo mv -v "$BASENAME"*"$TAG2"* TRASH/
|
||||
sudo rm -v TRASH/*
|
||||
|
||||
## Main
|
||||
|
||||
# System Backup
|
||||
|
||||
echo "*** Creating backup at '$BACKUP' ***"
|
||||
sudo zip -rv "$BACKUP" \
|
||||
/etc /var/{log,mail,spool} /srv /boot \
|
||||
/usr/local/etc $EXTRA \
|
||||
-x "/srv/backup/*" -x "/srv/sftp/*"
|
||||
-x "/srv/backup/*" -x "/srv/sftp/*" \
|
||||
-x "*/.gradle/" -x "*/app/build/*"
|
||||
status="$?"
|
||||
|
||||
if [[ "$status" != 0 ]]; then
|
||||
@@ -54,4 +62,27 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "\n\n"
|
||||
sleep 5
|
||||
|
||||
# Data Backup
|
||||
|
||||
echo "*** Creating backup at '$BACKUP2' ***"
|
||||
sudo zip -rv "$BACKUP2" \
|
||||
/root /home /srv/sftp \
|
||||
-x "*/.gradle/" -x "*/app/build/*"
|
||||
status="$?"
|
||||
|
||||
if [[ "$status" != 0 ]]; then
|
||||
echo "*** ERROR: Failed to create '$BACKUP2', file may be incorrect. ***"
|
||||
fi
|
||||
|
||||
if [[ -e "$BACKUP2" ]]; then
|
||||
ls -alh "$BACKUP2"
|
||||
echo "*** '$BACKUP2' created successfully! ***"
|
||||
else
|
||||
echo "*** '$BACKUP2' not found! ***"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# 2023-12-04 Hyperling
|
||||
# Lower resolution of audio and convert to mp3. Also
|
||||
# Lower the resolution of audio and convert to mp3.
|
||||
# Also see: compress-video.sh
|
||||
|
||||
## Setup ##
|
||||
@@ -36,7 +36,8 @@ function usage() {
|
||||
Compress audio to mp3. Can handle folders and work recursively.
|
||||
|
||||
Parameters:
|
||||
-q QUALITY : Integer for the maximum length of either media dimension.
|
||||
-q QUALITY : Integer for audio bitrate to transcode to.
|
||||
Defaults to 256k. No lower than 192k suggested.
|
||||
-l LOCATION : The specific media or folder which needs compressed.
|
||||
-r : Recursively shrink media based on the location passed.
|
||||
-f : Force the media to be shrunk even if a file already exists for it.
|
||||
@@ -181,8 +182,8 @@ $search "$location" | sort | while read media; do
|
||||
|
||||
if [[ -n "$delete" ]]; then
|
||||
echo -n " DELETE: "
|
||||
if [[ -d ~/TRASH ]]; then
|
||||
mv -v "$media" ~/TRASH/
|
||||
if [[ -d $HOME/TRASH ]]; then
|
||||
mv -v "$media" $HOME/TRASH/
|
||||
else
|
||||
rm -v "$media"
|
||||
fi
|
||||
|
||||
@@ -15,6 +15,7 @@ size=2000
|
||||
|
||||
# Strings
|
||||
tag="shrunk"
|
||||
use_tag="Y"
|
||||
date_YYYYMMDD="`date "+%Y%m%d"`"
|
||||
location="."
|
||||
search="ls"
|
||||
@@ -28,7 +29,7 @@ function usage() {
|
||||
# Parameters:
|
||||
# 1) The exit status to use.
|
||||
status=$1
|
||||
echo "Usage: $PROG [-s SIZE] [-l LOCATION] [-A | [-r] [-f] [-d] [-c]] [-h] [-x] [-t]" >&2
|
||||
echo "Usage: $PROG [-s SIZE] [-l LOCATION] [-A | [-r] [-f] [-d] [-c] [-e | -t] [-h] [-x] [-n]" >&2
|
||||
cat <<- EOF
|
||||
Compress JPG or PNG image(s). Can handle folders and work recursively.
|
||||
|
||||
@@ -42,17 +43,18 @@ function usage() {
|
||||
-F : FORCE the image to be shrunk even if the file is already shrunk.
|
||||
-d : Delete the original image if the compressed image is smaller.
|
||||
-c : Clean the filename of underscores, dashes, 'IMG', etc.
|
||||
-e | -t : Format timestamp to the expanded model.
|
||||
-A : Resursively Force, Delete, and Clean.
|
||||
-h : Display this usage text.
|
||||
-x : Enable BASH debugging.
|
||||
-t : Format timestamp.
|
||||
-n : No file extension.
|
||||
EOF
|
||||
exit $status
|
||||
}
|
||||
|
||||
## Parameters ##
|
||||
|
||||
while getopts ":s:l:rfFdcAhxt" opt; do
|
||||
while getopts ":s:l:rfFdcetAhxn" opt; do
|
||||
case $opt in
|
||||
s) in_size="$OPTARG" && size="$in_size" ;;
|
||||
l) location="$OPTARG" ;;
|
||||
@@ -62,10 +64,11 @@ while getopts ":s:l:rfFdcAhxt" opt; do
|
||||
d) delete="Y" ;;
|
||||
c) clean="Y" ;;
|
||||
e) expand="Y" ;;
|
||||
A) recurse="Y" && search="find" && force="Y" && delete="Y" && expand="Y" ;;
|
||||
t) expand="Y" ;;
|
||||
A) recurse="Y" && search="find" && force="Y" && delete="Y" ;;
|
||||
h) usage 0 ;;
|
||||
x) set -x ;;
|
||||
t) format_time="Y" ;;
|
||||
n) use_tag="N" ;;
|
||||
*) echo "ERROR: Option $OPTARG not recognized." >&2 && usage 1 ;;
|
||||
esac
|
||||
done
|
||||
@@ -114,6 +117,12 @@ $search "$location" | sort | while read image; do
|
||||
fi
|
||||
|
||||
new_image="${image//.$extension/}.$tag-$date_YYYYMMDD.$size.$extension"
|
||||
if [[ "$use_tag" == "N" ]]; then
|
||||
new_image="$image"
|
||||
new_image="${new_image//.$extension/}"
|
||||
new_image="${new_image//.$tag/}"
|
||||
new_image="$new_image.$tag.$extension"
|
||||
fi
|
||||
|
||||
## Clean Filename ##
|
||||
# Prevent directory from having its name cleaned too.
|
||||
@@ -132,9 +141,7 @@ $search "$location" | sort | while read image; do
|
||||
# Date Data
|
||||
new_image_exp="${TEMP:0:4}-${TEMP:4:2}-${TEMP:6:2}"
|
||||
# Time Data
|
||||
if [[ "$format_time" == "Y" ]]; then
|
||||
new_image_exp="${new_image_exp}_${TEMP:8:2}-${TEMP:10:2}-${TEMP:12:2}"
|
||||
fi
|
||||
new_image_exp="${new_image_exp}_${TEMP:8:2}-${TEMP:10:2}-${TEMP:12:2}"
|
||||
# Remainder Data
|
||||
if [[ "${TEMP:14:1}" == "." ]]; then
|
||||
SEP=""
|
||||
@@ -156,7 +163,7 @@ $search "$location" | sort | while read image; do
|
||||
fi
|
||||
|
||||
# Skip if a compressed image was already created today.
|
||||
if [[ -e "$new_image" || -e $new_image_clean ]]; then
|
||||
if [[ (-e "$new_image" || -e $new_image_clean) && $use_tag == "Y" ]]; then
|
||||
echo " SKIP: Image has already been shrunk previously, moving on."
|
||||
continue
|
||||
fi
|
||||
@@ -208,8 +215,8 @@ $search "$location" | sort | while read image; do
|
||||
|
||||
if [[ -n "$delete" ]]; then
|
||||
echo -n " DELETE: "
|
||||
if [[ -d ~/TRASH ]]; then
|
||||
mv -v "$image" ~/TRASH/
|
||||
if [[ -d $HOME/TRASH ]]; then
|
||||
mv -v "$image" $HOME/TRASH/
|
||||
else
|
||||
rm -v "$image"
|
||||
fi
|
||||
|
||||
@@ -225,8 +225,8 @@ $search_command "$input" | sort | while read file; do
|
||||
if [[ -e "$newfile" || -e "$new_video_clean" ]]; then
|
||||
if [[ "$force" == "Y" ]]; then
|
||||
echo "FORCE: Removing '$newfile'."
|
||||
if [[ -d ~/TRASH ]]; then
|
||||
mv -v "$newfile" "$new_video_clean" ~/TRASH/ 2>/dev/null
|
||||
if [[ -d $HOME/TRASH ]]; then
|
||||
mv -v "$newfile" "$new_video_clean" $HOME/TRASH/ 2>/dev/null
|
||||
else
|
||||
rm -v "$newfile" "$new_video_clean" 2>/dev/null
|
||||
fi
|
||||
@@ -279,8 +279,8 @@ $search_command "$input" | sort | while read file; do
|
||||
|
||||
if [[ -n "$delete" ]]; then
|
||||
echo -n "Original has been deleted: "
|
||||
if [[ -d ~/TRASH ]]; then
|
||||
mv -v "$file" ~/TRASH/
|
||||
if [[ -d $HOME/TRASH ]]; then
|
||||
mv -v "$file" $HOME/TRASH/
|
||||
else
|
||||
rm -v "$file"
|
||||
fi
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
DIR="$(dirname -- "${BASH_SOURCE[0]}")"
|
||||
PROG="$(basename -- "${BASH_SOURCE[0]}")"
|
||||
|
||||
nixos_working_dir=~/nixos-config-deleteme
|
||||
nixos_working_dir=$HOME/nixos-config-deleteme
|
||||
nixos_working_exe=activate.sh
|
||||
|
||||
## Functions ##
|
||||
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source /usr/local/bin/volume.function
|
||||
|
||||
volume $@
|
||||
@@ -0,0 +1,335 @@
|
||||
# This file has been auto-generated by i3-config-wizard(1).
|
||||
# It will not be overwritten, so edit it as you like.
|
||||
#
|
||||
# Should you change your keyboard layout some time, delete
|
||||
# this file and re-run i3-config-wizard(1).
|
||||
#
|
||||
|
||||
# i3 config file (v4)
|
||||
#
|
||||
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
# Use the `xev` command to see the name and code of a keyboard key.
|
||||
|
||||
set $mod Mod4
|
||||
set $alt Mod1
|
||||
set $ctrl Control
|
||||
set $shift Shift
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
font pango:monospace 8
|
||||
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
#font pango:DejaVu Sans Mono 8
|
||||
|
||||
# Start XDG autostart .desktop files using dex. See also
|
||||
# https://wiki.archlinux.org/index.php/XDG_Autostart
|
||||
exec --no-startup-id dex --autostart --environment i3
|
||||
|
||||
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
|
||||
# they are included here as an example. Modify as you see fit.
|
||||
|
||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
||||
# screen before suspend. Use loginctl lock-session to lock your screen.
|
||||
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
|
||||
|
||||
# NetworkManager is the most popular way to manage wireless networks on Linux,
|
||||
# and nm-applet is a desktop environment-independent system tray GUI for it.
|
||||
exec --no-startup-id nm-applet
|
||||
|
||||
# Use pactl to adjust volume in PulseAudio.
|
||||
set $refresh_i3status killall -SIGUSR1 i3status
|
||||
#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
|
||||
#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
|
||||
#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
|
||||
#bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# move tiling windows via drag & drop by left-clicking into the title bar,
|
||||
# or left-clicking anywhere into the window while holding the floating modifier.
|
||||
tiling_drag modifier titlebar
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec i3-sensible-terminal
|
||||
#bindsym $mod+Return exec st
|
||||
|
||||
# kill focused window
|
||||
#bindsym $mod+Shift+q kill
|
||||
bindsym $mod+q kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
bindsym $mod+d exec --no-startup-id dmenu_run
|
||||
bindsym $mod+b exec --no-startup-id dmenu_run
|
||||
bindsym $mod+space exec --no-startup-id dmenu_run
|
||||
# A more modern dmenu replacement is rofi:
|
||||
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
|
||||
# There also is i3-dmenu-desktop which only displays applications shipping a
|
||||
# .desktop file. It is a wrapper around dmenu, so you need that installed.
|
||||
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
|
||||
|
||||
# change focus
|
||||
#bindsym $mod+j focus left
|
||||
#bindsym $mod+k focus down
|
||||
#bindsym $mod+l focus up
|
||||
#bindsym $mod+semicolon focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
#bindsym $mod+Shift+j move left
|
||||
#bindsym $mod+Shift+k move down
|
||||
#bindsym $mod+Shift+l move up
|
||||
#bindsym $mod+Shift+semicolon move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+h split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
#bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
|
||||
## Extra Program Shortcuts ##
|
||||
|
||||
# Theming.
|
||||
bindsym $mod+t exec lxappearance
|
||||
|
||||
# Manage files.
|
||||
bindsym $mod+m exec thunar
|
||||
|
||||
# Internet.
|
||||
#bindsym $mod+i exec firefox
|
||||
bindsym $mod+i exec firefox-flatpak
|
||||
|
||||
# Code.
|
||||
bindsym $mod+c exec codium-flatpak
|
||||
|
||||
|
||||
## Brightness ##
|
||||
# Use the bracket keys to change the brightness.
|
||||
# light requires sudo privileges unless video group and udev are configured.
|
||||
bindsym $mod+bracketleft exec --no-startup-id "light -U 05 && notify-send 'Brightness - ' $(light -G)"
|
||||
bindsym $mod+bracketright exec --no-startup-id "light -A 05 && notify-send 'Brightness + ' $(light -G)"
|
||||
bindsym $shift+$mod+bracketleft exec --no-startup-id "light -U 20 && notify-send 'Brightness ---' $(light -G)"
|
||||
bindsym $shift+$mod+bracketright exec --no-startup-id "light -A 20 && notify-send 'Brightness +++' $(light -G)"
|
||||
|
||||
# Also get the actual brightness keys to work!!
|
||||
bindsym XF86MonBrightnessUp exec --no-startup-id "light -A 05 && notify-send 'Brightness + ' $(light -G)"
|
||||
bindsym XF86MonBrightnessDown exec --no-startup-id "light -U 05 && notify-send 'Brightness - ' $(light -G)"
|
||||
bindsym $shift+XF86MonBrightnessUp exec --no-startup-id "light -A 20 && notify-send 'Brightness +++' $(light -G)"
|
||||
bindsym $shift+XF86MonBrightnessDown exec --no-startup-id "light -U 20 && notify-send 'Brightness ---' $(light -G)"
|
||||
|
||||
|
||||
## Volume ##
|
||||
# The volume function is from https://git.hyperling.com/me/env-ansible
|
||||
|
||||
# Use the comma and period keys to change volume.
|
||||
bindsym $mod+comma exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -05 && notify-send "Volume - " $(volume)'
|
||||
bindsym $mod+period exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +05 && notify-send "Volume + " $(volume)'
|
||||
bindsym $shift+$mod+comma exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -25 && notify-send "Volume ---" $(volume)'
|
||||
bindsym $shift+$mod+period exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +25 && notify-send "Volume +++" $(volume)'
|
||||
|
||||
# Actual volume keys.
|
||||
bindsym XF86AudioMute exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume mute && notify-send "Volume Muted" $(volume)'
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +05 && notify-send "Volume + " $(volume)'
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -05 && notify-send "Volume - " $(volume)'
|
||||
bindsym $shift+XF86AudioRaiseVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +25 && notify-send "Volume +++ " $(volume)'
|
||||
bindsym $shift+XF86AudioLowerVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -25 && notify-send "Volume --- " $(volume)'
|
||||
|
||||
|
||||
## Keyboard Brightness ##
|
||||
|
||||
# Macbooks tend to use 'sysfs/leds/smc::kbd_backlight'
|
||||
# NovaCustom laptop is 'sysfs/leds/system76_acpi::kbd_backlight'
|
||||
# Some other laptops may be 'sysfs/class/leds/...', use ìght -L`to find out.
|
||||
bindsym XF86KbdBrightnessUp exec "light -s sysfs/leds/smc::kbd_backlight -A 05 && notify-send 'Keyboard Brightness + ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym XF86KbdBrightnessDown exec "light -s sysfs/leds/smc::kbd_backlight -U 05 && notify-send 'Keyboard Brightness - ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym $shift+XF86KbdBrightnessUp exec "light -s sysfs/leds/smc::kbd_backlight -A 20 && notify-send 'Keyboard Brightness +++' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym $shift+XF86KbdBrightnessDown exec "light -s sysfs/leds/smc::kbd_backlight -U 20 && notify-send 'Keyboard Brightness ---' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
|
||||
bindsym $mod+apostrophe exec "light -s sysfs/leds/smc::kbd_backlight -A 05 && notify-send 'Keyboard Brightness + ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym $mod+semicolon exec "light -s sysfs/leds/smc::kbd_backlight -U 05 && notify-send 'Keyboard Brightness - ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym $shift+$mod+apostrophe exec "light -s sysfs/leds/smc::kbd_backlight -A 20 && notify-send 'Keyboard Brightness +++' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym $shift+$mod+semicolon exec "light -s sysfs/leds/smc::kbd_backlight -U 20 && notify-send 'Keyboard Brightness ---' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
|
||||
|
||||
## Workspaces ##
|
||||
|
||||
# Define names for default workspaces for which we configure key bindings later on.
|
||||
# We use variables to avoid repeating the names in multiple places.
|
||||
# Command Line
|
||||
set $ws1 "1 - CMD"
|
||||
# Web Surfing
|
||||
set $ws2 "2 - WEB"
|
||||
# Programming
|
||||
set $ws3 "3 - PRG"
|
||||
# Flutter
|
||||
set $ws4 "4 - FLT"
|
||||
# Chats
|
||||
set $ws5 "5 - CHT"
|
||||
# Other
|
||||
set $ws6 "6 - OTH"
|
||||
# Torrents
|
||||
set $ws7 "7 - TOR"
|
||||
# Music
|
||||
set $ws8 "8 - MUS"
|
||||
# Videos
|
||||
set $ws9 "9 - VID"
|
||||
# VPNs
|
||||
set $ws10 "10 - VPN"
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace number $ws1
|
||||
bindsym $mod+2 workspace number $ws2
|
||||
bindsym $mod+3 workspace number $ws3
|
||||
bindsym $mod+4 workspace number $ws4
|
||||
bindsym $mod+5 workspace number $ws5
|
||||
bindsym $mod+6 workspace number $ws6
|
||||
bindsym $mod+7 workspace number $ws7
|
||||
bindsym $mod+8 workspace number $ws8
|
||||
bindsym $mod+9 workspace number $ws9
|
||||
bindsym $mod+0 workspace number $ws10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace number $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace number $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace number $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace number $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace number $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace number $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace number $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace number $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace number $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace number $ws10
|
||||
|
||||
## Keep certain programs in certain tabs. ##
|
||||
# Use the `xprop` command to find the class of a program.
|
||||
# (?i) makes the regex case insensitive.
|
||||
|
||||
assign [class="(?i)Navigator"] $ws2
|
||||
assign [class="(?i).*Firefox.*"] $ws2
|
||||
|
||||
assign [class="(?i).*Codium.*"] $ws3
|
||||
|
||||
assign [class="(?i).*Code.*"] $ws4
|
||||
|
||||
assign [class="(?i).*Transmission.*"] $ws7
|
||||
|
||||
assign [class="(?i).*VPN.*"] $ws10
|
||||
assign [class="(?i).*Mullvad.*"] $ws10
|
||||
|
||||
|
||||
## Workspace Specific Workflows ##
|
||||
bindsym $ctrl+$shift+1 workspace $ws1; exec i3-sensible-terminal;
|
||||
bindsym $ctrl+$shift+2 workspace $ws2; exec firefox-flatpak;
|
||||
bindsym $ctrl+$shift+3 workspace $ws3; exec codium-flatpak;
|
||||
bindsym $ctrl+$shift+4 workspace $ws4; exec code-flatpak;
|
||||
bindsym $ctrl+$shift+5 workspace $ws5; exec "session; dino"
|
||||
|
||||
|
||||
## Reloads, Restarts, Exit ##
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
|
||||
bindsym $mod+Shift+q exit
|
||||
|
||||
# lock
|
||||
bindsym $ctrl+$alt+l exec "i3lock -c 000000 -e -f && sleep 1 && xset dpms force off"
|
||||
bindsym $ctrl+$mod+l exec "i3lock -c 000000 -e -f && sleep 1 && xset dpms force off"
|
||||
bindsym $shift+$mod+l exec "i3lock -c 000000 -e -f && sleep 1 && xset dpms force off"
|
||||
|
||||
# shutdown entire system.
|
||||
#bindsym $ctrl+$shift+q exec dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
|
||||
bindsym $ctrl+$alt+q exec sudo shutdown -h now
|
||||
bindsym $shift+$alt+q exec sudo shutdown -h now
|
||||
bindsym $shift+$ctrl+q exec sudo shutdown -h now
|
||||
|
||||
## Resizing (Disabled) ##
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
#mode "resize" {
|
||||
# # These bindings trigger as soon as you enter the resize mode
|
||||
#
|
||||
# # Pressing left will shrink the window’s width.
|
||||
# # Pressing right will grow the window’s width.
|
||||
# # Pressing up will shrink the window’s height.
|
||||
# # Pressing down will grow the window’s height.
|
||||
# bindsym j resize shrink width 10 px or 10 ppt
|
||||
# bindsym k resize grow height 10 px or 10 ppt
|
||||
# bindsym l resize shrink height 10 px or 10 ppt
|
||||
# bindsym semicolon resize grow width 10 px or 10 ppt
|
||||
#
|
||||
# # same bindings, but for the arrow keys
|
||||
# bindsym Left resize shrink width 10 px or 10 ppt
|
||||
# bindsym Down resize grow height 10 px or 10 ppt
|
||||
# bindsym Up resize shrink height 10 px or 10 ppt
|
||||
# bindsym Right resize grow width 10 px or 10 ppt
|
||||
#
|
||||
# # back to normal: Enter or Escape or $mod+r
|
||||
# bindsym Return mode "default"
|
||||
# bindsym Escape mode "default"
|
||||
# bindsym $mod+r mode "default"
|
||||
#}
|
||||
#
|
||||
#bindsym $mod+r mode "resize"
|
||||
|
||||
|
||||
## Taskbar ##
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
bar {
|
||||
status_command i3status
|
||||
}
|
||||
|
||||
|
||||
## Startup Applications ##
|
||||
|
||||
exec mullvad-vpn
|
||||
exec i3-sensible-terminal
|
||||
#exec firefox-flatpak
|
||||
exec transmission
|
||||
|
||||
exec light -O
|
||||
exec light -N 0
|
||||
|
||||
exec setxkbmap -layout us -variant altgr-intl
|
||||
@@ -1,2 +1,5 @@
|
||||
|
||||
%sudo ALL=(ALL) ALL
|
||||
|
||||
# Allow anyone in the sudo group to shutdown or reboot without a password.
|
||||
%sudo ALL=(ALL) NOPASSWD: /sbin/shutdown, /usr/sbin/shutdown, /sbin/reboot, /usr/sbin/reboot
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
# title
|
||||
|
||||
NAME
|
||||
|
||||
# desc
|
||||
|
||||
CONTENT
|
||||
|
||||
---
|
||||
|
||||
Recorded and edited YYYY-MM-DD.
|
||||
Recorded YYYY-MM-DD, edited YYYY-MM-DD.
|
||||
|
||||
[blog.hyperling.com/TBD](https://blog.hyperling.com/TBD)
|
||||
|
||||
# tags
|
||||
|
||||
-
|
||||
,
|
||||
,
|
||||
,
|
||||
,
|
||||
@@ -21,6 +21,19 @@
|
||||
- include_tasks: facts/general/user.yml
|
||||
|
||||
|
||||
####### Start #######
|
||||
|
||||
- name: Main | Start
|
||||
block:
|
||||
|
||||
- name: Main | Start | Notify | Touch File
|
||||
include_tasks: tasks/general/acct_mgmt/notify.yml
|
||||
|
||||
- name: Main | Start | Notify | Add Message
|
||||
shell : echo "'Ansible' 'Provisioning started @ `date`'" >> "{{ notify_log_file }}"
|
||||
|
||||
when: workstation == true
|
||||
|
||||
####### NixOS #######
|
||||
# Install the .nix files and do a little data setup.
|
||||
|
||||
@@ -75,9 +88,13 @@
|
||||
- include_tasks: tasks/general/software/sendmail.yml
|
||||
when: ansible_system == "FreeBSD"
|
||||
|
||||
- include_tasks: tasks/general/software/aur.yml
|
||||
|
||||
# Gather again in case missing programs have now been installed.
|
||||
- include_tasks: facts/general/gather.yml
|
||||
|
||||
- include_tasks: tasks/general/settings/keyboard.yml
|
||||
|
||||
- include_tasks: tasks/general/acct_mgmt/groups.yml
|
||||
- include_tasks: tasks/general/acct_mgmt/users.yml
|
||||
- include_tasks: tasks/general/acct_mgmt/sudo.yml
|
||||
@@ -94,7 +111,6 @@
|
||||
when: ansible_system == "FreeBSD"
|
||||
|
||||
- include_tasks: tasks/general/software/metasploit.yml
|
||||
when: pentesting == true
|
||||
|
||||
when: provision == true
|
||||
|
||||
@@ -107,19 +123,32 @@
|
||||
|
||||
- include_tasks: facts/workstation/package.yml
|
||||
|
||||
# Set Up Desktop Environments #
|
||||
## Desktop Environments ##
|
||||
|
||||
- include_tasks: tasks/workstation/freebsd/software/gpu.yml
|
||||
when: ansible_system == "FreeBSD" and bsd_gpu == true
|
||||
|
||||
# Window Managers without true Desktop Environments #
|
||||
- include_tasks: tasks/workstation/shared/software/dwm.yml
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/i3.yml
|
||||
|
||||
# Polished Desktop Environments #
|
||||
- include_tasks: tasks/workstation/freebsd/software/gnome.yml
|
||||
when: ansible_system == "FreeBSD"
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/gnome.yml
|
||||
- name: Main | Workstation | Fancy Desktop Environments
|
||||
block:
|
||||
- include_tasks: tasks/workstation/linux/software/gnome.yml
|
||||
when: ansible_service_mgr == "systemd"
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/cinnamon.yml
|
||||
- include_tasks: tasks/workstation/linux/software/lxqt.yml
|
||||
when: ansible_system == "Linux"
|
||||
# TBD: Implement this: and extra_desktops == true
|
||||
|
||||
- include_tasks: tasks/workstation/shared/software/dwm.yml
|
||||
## Software Tasks ##
|
||||
|
||||
# Software Tasks #
|
||||
- include_tasks: tasks/workstation/linux/software/packages.yml
|
||||
when: ansible_system == "Linux"
|
||||
|
||||
@@ -141,9 +170,14 @@
|
||||
- include_tasks: tasks/workstation/mac-os/software/brew.yml
|
||||
when: ansible_system == "Darwin"
|
||||
|
||||
# Configuration Tasks #
|
||||
- include_tasks: tasks/workstation/linux/software/nodejs.yml
|
||||
|
||||
## Configuration Tasks ##
|
||||
|
||||
- include_tasks: tasks/workstation/shared/settings/gnome.yml
|
||||
when: not mobile
|
||||
- include_tasks: tasks/workstation/shared/settings/cinnamon.yml
|
||||
when: not mobile
|
||||
|
||||
- include_tasks: tasks/workstation/linux/cron/ansible.yml
|
||||
when: ansible_system == "Linux" and not mobile
|
||||
@@ -158,7 +192,12 @@
|
||||
|
||||
- include_tasks: tasks/workstation/shared/settings/services.yml
|
||||
|
||||
# Final Tasks (SLOW) #
|
||||
- include_tasks: tasks/workstation/linux/software/tlp.yml
|
||||
|
||||
- include_tasks: tasks/workstation/shared/settings/templates.yml
|
||||
|
||||
## Final Tasks (SLOW) ##
|
||||
|
||||
- include_tasks: tasks/workstation/linux/software/flutter.yml
|
||||
when: ansible_system == "Linux"
|
||||
|
||||
@@ -246,8 +285,25 @@
|
||||
####### Reporting #######
|
||||
# Provide information for analysis.
|
||||
|
||||
- include_tasks: tasks/general/software/telegraf.yml
|
||||
- name: Main | Reporting
|
||||
block:
|
||||
|
||||
- include_tasks: tasks/general/tests/services.yml
|
||||
- include_tasks: tasks/general/tests/lynis.yml
|
||||
- include_tasks: tasks/general/tests/nmap.yml
|
||||
- include_tasks: tasks/general/software/telegraf.yml
|
||||
|
||||
- include_tasks: tasks/general/tests/services.yml
|
||||
- include_tasks: tasks/general/tests/lynis.yml
|
||||
- include_tasks: tasks/general/tests/nmap.yml
|
||||
|
||||
|
||||
####### Finish #######
|
||||
|
||||
- name: Main | Finish
|
||||
block:
|
||||
|
||||
- name: Main | Finish | Notify | Touch File
|
||||
include_tasks: tasks/general/acct_mgmt/notify.yml
|
||||
|
||||
- name: Main | Finish | Notify | Add Message
|
||||
shell : echo "'Ansible' 'Provisioning finished @ `date`'" >> "{{ notify_log_file }}"
|
||||
|
||||
when: workstation == true
|
||||
|
||||
@@ -32,7 +32,7 @@ function usage {
|
||||
-g : Enable the General config with test contents.
|
||||
-w : Enable the Workstation config with test contents.
|
||||
-s : Enable the Server config with test contents.
|
||||
-f : Display this system's facts.
|
||||
-f : Display this system's facts.
|
||||
-h : Display this help text.
|
||||
|
||||
EOF
|
||||
@@ -130,6 +130,7 @@ echo "Installed!"
|
||||
if [[ "$show_facts" == "Y" ]]; then
|
||||
echo "Showing Ansible Facts"
|
||||
ansible localhost -m setup --connection=local
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#echo "Adding Ansible Collections..."
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
# Create and manage permissions for notify log.
|
||||
|
||||
- name: General | Notify | Update File
|
||||
shell: "{{ item }}"
|
||||
loop:
|
||||
- touch "{{ notify_log_file }}"
|
||||
- chmod 777 "{{ notify_log_file }}"
|
||||
@@ -101,22 +101,48 @@
|
||||
; Slows down the rate of services such as telegraf and cron.
|
||||
; Default: false
|
||||
;
|
||||
;;;;;;;;;;;;;;;;;;;; Server Shortcut ;;;;;;;;;;;;;;;;;;;;
|
||||
;;;;;;;;;;;;;;;;;;;; Server Shortcuts ;;;;;;;;;;;;;;;;;;;;
|
||||
;
|
||||
; For typing `prod` and getting straight to a server, like in env-termux.
|
||||
;
|
||||
; prod_host : Branch to use on this machine.
|
||||
; Imagine the command:
|
||||
; `ssh prod_user@prod_host:prod_port`
|
||||
;
|
||||
; prod_host : Hostname for the production server.
|
||||
; Example: myserver.com, mywebhost.net
|
||||
; Default: hyperling.com
|
||||
;
|
||||
; prod_port : Provide the git host that the machine should poll.
|
||||
; prod_port : Port for the production server.
|
||||
; Example: 22, 222, 2222
|
||||
; Default: 22
|
||||
;
|
||||
; prod_user : Port of the server host to use for SSH requests.
|
||||
; prod_user : Username for accessing the production server.
|
||||
; Example: jim, bob, jeff, anne
|
||||
; Default: user
|
||||
;
|
||||
; For pushing MASTER directories to an SFTP server with `send-master`.
|
||||
;
|
||||
; Imagine the command:
|
||||
; `rsync -auPhz --delete -e 'ssh -p prod_data_port' ./mydata-MASTER/ \
|
||||
; prod_data_user@prod_data_host:/prod_data_dir/mydata-clone
|
||||
; `
|
||||
;
|
||||
; prod_data_host : Branch to use on this machine.
|
||||
; Example: sftp.myserver.com, sftp.mywebhost.net
|
||||
; Default: hyperling.com
|
||||
;
|
||||
; prod_data_port : Provide the git host that the machine should poll.
|
||||
; Example: 22, 222, 2222
|
||||
; Default: 22
|
||||
;
|
||||
; prod_data_user : Port of the server host to use for SSH requests.
|
||||
; Example: jim, bob, jeff, anne
|
||||
; Default: user
|
||||
;
|
||||
; prod_data_dir : Port of the server host to use for SSH requests.
|
||||
; Example: /srv/sftp/
|
||||
; Default: /srv/sftp/
|
||||
;
|
||||
[global]
|
||||
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config'
|
||||
state: present
|
||||
@@ -143,6 +169,15 @@
|
||||
prod_host: "{{ lookup('ini', 'prod_host file={{gen_file}} default=hyperling.com') }}"
|
||||
prod_port: "{{ lookup('ini', 'prod_port file={{gen_file}} default=22') }}"
|
||||
prod_user: "{{ lookup('ini', 'prod_user file={{gen_file}} default=user') }}"
|
||||
prod_data_host: "{{ lookup('ini', 'prod_data_host file={{gen_file}} default=hyperling.com') }}"
|
||||
prod_data_port: "{{ lookup('ini', 'prod_data_port file={{gen_file}} default=22') }}"
|
||||
prod_data_user: "{{ lookup('ini', 'prod_data_user file={{gen_file}} default=user') }}"
|
||||
prod_data_dir: "{{ lookup('ini', 'prod_data_dir file={{gen_file}} default=/srv/sftp') }}"
|
||||
|
||||
- name: General | Account Management | Provisioning Configuration | General | Boolean Check | Swap Block
|
||||
set_fact:
|
||||
swap_block: "{{ swap_block | bool }}"
|
||||
when: swap_block in ("true", "false")
|
||||
|
||||
- name: General | Account Management | Provisioning Configuration | General | List
|
||||
set_fact:
|
||||
@@ -166,6 +201,10 @@
|
||||
- { 'prod_host': "{{ prod_host }}" }
|
||||
- { 'prod_port': "{{ prod_port }}" }
|
||||
- { 'prod_user': "{{ prod_user }}" }
|
||||
- { 'prod_data_host': "{{ prod_data_host }}" }
|
||||
- { 'prod_data_port': "{{ prod_data_port }}" }
|
||||
- { 'prod_data_user': "{{ prod_data_user }}" }
|
||||
- { 'prod_data_dir': "{{ prod_data_dir }}" }
|
||||
|
||||
|
||||
## Workstation ##
|
||||
@@ -223,6 +262,11 @@
|
||||
mobile: "{{ lookup('ini', 'mobile file={{wrk_file}} default=false') | bool }}"
|
||||
redmode: "{{ lookup('ini', 'redmode file={{wrk_file}} default=true' ) | bool }}"
|
||||
|
||||
- name: General | Account Management | Provisioning Configuration | Workstation | Boolean Check | Editing
|
||||
set_fact:
|
||||
editing: "{{ editing | bool }}"
|
||||
when: editing in ("true", "false")
|
||||
|
||||
- name: General | Account Management | Provisioning Configuration | Workstation | List
|
||||
set_fact:
|
||||
provision_variables: "{{ provision_variables | combine(item) }}"
|
||||
|
||||
+211
-106
@@ -122,12 +122,19 @@
|
||||
|
||||
## Files ##
|
||||
|
||||
- name: General | Account Management | Users | Files | Profile Variables
|
||||
set_fact:
|
||||
export_path_additions: export PATH="$HOME/bin:"{{ global_bin }}":"{{ shared_rc_bin }}":$PATH"
|
||||
export_path_sbin: export PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin"
|
||||
#export_terminal: export TERMINAL="alacritty" # colors look weird.
|
||||
export_terminal: export TERMINAL="kitty"
|
||||
keyboard_settings: setxkbmap -layout us -variant altgr-intl
|
||||
|
||||
- name: General | Account Management | Users | Files | RC Variables
|
||||
set_fact:
|
||||
alias_cp: alias cp='cp -v'
|
||||
alias_mv: alias mv='mv -v'
|
||||
alias_rm: alias rm='echo "Use mv ~/TRASH/ instead!"'
|
||||
export_path_additions: export PATH="~/bin:"{{ global_bin }}":$PATH"
|
||||
function_wttr: |
|
||||
function weather() {
|
||||
# 20210301 - Someone showed me an awesome weather API! Had to implement it!
|
||||
@@ -145,7 +152,39 @@
|
||||
fi
|
||||
curl "https://wttr.in/${1//\ /+}"
|
||||
}
|
||||
export_PS1: export PS1='[\u@\h \w]\$ '
|
||||
export_PS1: |
|
||||
## Prompts ##
|
||||
|
||||
# Old Trusty
|
||||
#export PS1='[\u@\h \w]\$ '
|
||||
|
||||
# 20251201 - Add time.
|
||||
#export PS1='[\t \u@\h \w]\$ '
|
||||
|
||||
# 20251201 - Add colors.
|
||||
# This helps to determine the color palette numbers:
|
||||
# https://robotmoon.com/bash-prompt-generator/
|
||||
# Colors have been moved to env-shared project's .rc_shared file.
|
||||
|
||||
if [[ "$USER" == "root" || $UID == 0 ]]; then
|
||||
CLR_BRACKETS=$BOLD$YELLOW
|
||||
CLR_TIME=$BOLD$ORANGE
|
||||
CLR_USER=$BOLD$SCARLET
|
||||
CLR_DIR=$BOLD$RED
|
||||
CLR_PROMPT=$BOLD$GRAY
|
||||
else
|
||||
CLR_BRACKETS=$RESET
|
||||
CLR_TIME=$BOLD$PURPLE
|
||||
CLR_USER=$BOLD$ORANGE
|
||||
CLR_DIR=$BOLD$GREEN
|
||||
CLR_PROMPT=$RESET
|
||||
fi
|
||||
|
||||
export PS1='\[$CLR_BRACKETS\][\[$CLR_TIME\]\t \[$CLR_USER\]\u@\h \[$CLR_DIR\]\w\[$CLR_BRACKETS\]]\[$CLR_PROMPT\]\$ \[$RESET\]'
|
||||
|
||||
export PS2='\[$CLR_BRACKETS\](\[$CLR_TIME\]>\[$CLR_USER\]^\[$CLR_DIR\].\[$CLR_USER\]^\[$CLR_BRACKETS\])\[$CLR_TIME\]> \[$RESET\]'
|
||||
|
||||
## End Prompts ##
|
||||
alias_remount: |
|
||||
alias remount='
|
||||
sudo umount /mnt/*
|
||||
@@ -243,7 +282,7 @@
|
||||
alias init-video='
|
||||
mkdir -v raw
|
||||
mkdir -v exports
|
||||
cp ~/Templates/*video* ./
|
||||
cp $HOME/Templates/*video* ./
|
||||
'
|
||||
alias init-vid=init-video
|
||||
alias init-program='
|
||||
@@ -259,6 +298,7 @@
|
||||
}
|
||||
function goodbye {
|
||||
update -yg
|
||||
bye
|
||||
}
|
||||
metasploit_aliases: |
|
||||
alias metasploit="msfconsole"
|
||||
@@ -297,7 +337,7 @@
|
||||
alias trashed-cleanup="clean-trashed"
|
||||
alias trashed-clean="clean-trashed"
|
||||
function_check_trash: |
|
||||
function check-trash() {
|
||||
function check-trash-old() {
|
||||
unset OPTIND
|
||||
unset clean
|
||||
unset network
|
||||
@@ -392,14 +432,14 @@
|
||||
echo "Checking but not cleaning /var/mail..."
|
||||
du -ha /var/mail | sort -h
|
||||
if [[ $clean == "Y" ]]; then
|
||||
clean-trashed "~/"
|
||||
clean-trashed "$HOME/"
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
alias check_trash="check-trash"
|
||||
alias_clean_trash: alias clean-trash='check-trash --clean'
|
||||
alias_trash_check: alias trash-check='check-trash'
|
||||
alias_trash_clean: alias trash-clean='trash-check --clean'
|
||||
alias_trash_check: alias trash-check='check-trash-old'
|
||||
alias_clean_trash: alias clean-trash='check-trash-old --clean'
|
||||
alias_trash_clean: alias trash-clean='clean-trash'
|
||||
alias_clean_dir: |
|
||||
function clean-dir() {
|
||||
sudo du -hs
|
||||
@@ -453,6 +493,13 @@
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ -f ./prep.sh ]]; then
|
||||
echo "Running prep.sh first..."
|
||||
./prep.sh
|
||||
fi
|
||||
|
||||
export BUILD_TIMESTAMP="`date`"
|
||||
|
||||
docker compose build &&
|
||||
docker compose down &&
|
||||
docker compose up -d
|
||||
@@ -475,6 +522,13 @@
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ -f ./prep.sh ]]; then
|
||||
echo "Running prep.sh first..."
|
||||
./prep.sh
|
||||
fi
|
||||
|
||||
export BUILD_TIMESTAMP="`date`"
|
||||
|
||||
docker compose pull &&
|
||||
docker compose build &&
|
||||
docker compose down &&
|
||||
@@ -519,6 +573,14 @@
|
||||
docker ps
|
||||
return;
|
||||
fi
|
||||
|
||||
if [[ -f ./prep.sh ]]; then
|
||||
echo "Running prep.sh first..."
|
||||
./prep.sh
|
||||
fi
|
||||
|
||||
export BUILD_TIMESTAMP="`date`"
|
||||
|
||||
echo "*** Upgrading Images ***" &&
|
||||
docker compose pull &&
|
||||
echo "*** Building Containers ***" &&
|
||||
@@ -544,6 +606,11 @@
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ -f ./prep.sh ]]; then
|
||||
echo "Running prep.sh first..."
|
||||
./prep.sh
|
||||
fi
|
||||
|
||||
docker compose down &&
|
||||
docker compose up -d
|
||||
|
||||
@@ -559,37 +626,11 @@
|
||||
alias docker-start="docker compose up -d && docker compose start"
|
||||
alias docker-prep="docker compose pull && docker compose build"
|
||||
alias_code_check: |
|
||||
alias code-check='
|
||||
echo "Checking ~/Code directory for git changes."
|
||||
ls -d ~/Code/* | while read project; do
|
||||
if [[ ! -d $project ]]; then
|
||||
continue
|
||||
fi
|
||||
echo -e "\n*** `basename $project` ***"
|
||||
cd $project
|
||||
if [[ -d .git ]]; then
|
||||
git ls-remote --exit-code --heads origin dev
|
||||
dev_exists="$?"
|
||||
if [[ "$dev_exists" == 0 ]]; then
|
||||
git switch dev
|
||||
elif [[ "$dev_exists" == 2 ]]; then
|
||||
git switch main
|
||||
else
|
||||
echo "ERROR: Unknown status for dev_exists, '$dev_exists'."
|
||||
continue
|
||||
fi
|
||||
git pull
|
||||
git push
|
||||
else
|
||||
echo "Not a Git project, skipping!"
|
||||
fi
|
||||
done
|
||||
echo -e "\nDone!"
|
||||
'
|
||||
alias code-check='git-check $HOME/Code'
|
||||
alias code-sync='code-check'
|
||||
alias_code_reset: |
|
||||
alias code-reset='
|
||||
ls -d ~/Code/* | while read project
|
||||
ls -d $HOME/Code/* | while read project
|
||||
do echo "*** `basename $project` ***"
|
||||
cd $project
|
||||
git stash
|
||||
@@ -634,7 +675,7 @@
|
||||
echo -e "\n*** Move old projects to TRASH ***"
|
||||
unseed_dir="$HOME/TRASH/`date +%Y%m%d_%H%M%S`_UnseededCodeProjects"
|
||||
mkdir -pv "$unseed_dir"
|
||||
mv -v ~/Code/* "$unseed_dir"/ 2>/dev/null
|
||||
mv -v $HOME/Code/* "$unseed_dir"/ 2>/dev/null
|
||||
|
||||
# Git repo information.
|
||||
git_repo_ssh={{ git_repo_ssh }}
|
||||
@@ -654,7 +695,7 @@
|
||||
|
||||
# Download of the project.
|
||||
git clone ${git_repo_ssh_basename}${git_project} \
|
||||
--branch $git_branch ~/Code/$dest_folder
|
||||
--branch $git_branch $HOME/Code/$dest_folder
|
||||
done
|
||||
}
|
||||
function_clean_filenames: |
|
||||
@@ -686,8 +727,6 @@
|
||||
done
|
||||
echo -e "\nDone!\n"
|
||||
}
|
||||
alias_clone: |
|
||||
alias clone="rsync -auPhz --delete --exclude '.gradle' --exclude 'app/build'"
|
||||
export_hyperling: |
|
||||
export HYPERLING6="2a07:e03:3:80::1"
|
||||
export HYPERLING4="185.130.47.173"
|
||||
@@ -697,22 +736,33 @@
|
||||
if [[ -e $DOCKER_SOURCE && $LOGNAME == "root" ]]; then
|
||||
source $DOCKER_SOURCE
|
||||
fi
|
||||
alias_scan: |
|
||||
alias scan="nmap -A -p- --script=vuln"
|
||||
export_prod:
|
||||
export PROD_HOST="{{ prod_host }}"
|
||||
export PROD_PORT="{{ prod_port }}"
|
||||
export PROD_USER="{{ prod_user }}"
|
||||
|
||||
export PROD_GIT_HOST="{{ git_host }}"
|
||||
export PROD_GIT_PORT="{{ git_ssh_port }}"
|
||||
export PROD_GIT_USER="{{ git_user }}"
|
||||
|
||||
export PROD_DATA_HOST="{{ prod_data_host }}"
|
||||
export PROD_DATA_PORT="{{ prod_data_port }}"
|
||||
export PROD_DATA_USER="{{ prod_data_user }}"
|
||||
export PROD_DATA_DIR="{{ prod_data_dir }}"
|
||||
alias_prod: |
|
||||
alias prod="ssh -p {{ prod_port }} {{ prod_user }}@{{ prod_host }}"
|
||||
function_clean_code: |
|
||||
function clean-code {
|
||||
echo -e "******* Android *******\n*** Build Caches ***"
|
||||
find ~/Code/android-*/app -maxdepth 1 -type d -name "build" \
|
||||
find $HOME/Code/android-*/app -maxdepth 1 -type d -name "build" \
|
||||
-exec du -hs {} \; -exec rm -rf {} \;
|
||||
echo -e "\n*** Gradle Caches ***"
|
||||
find ~/Code/android-*/ -maxdepth 1 -type d -name ".gradle" \
|
||||
find $HOME/Code/android-*/ -maxdepth 1 -type d -name ".gradle" \
|
||||
-exec du -hs {} \; -exec rm -rf {} \;
|
||||
|
||||
echo -e "******* Flutter *******"
|
||||
ls ~/Code | grep flutter | while read project; do
|
||||
cd ~/Code/$project
|
||||
ls $HOME/Code | grep flutter | while read project; do
|
||||
cd $HOME/Code/$project
|
||||
pwd
|
||||
flutter clean
|
||||
echo -e "\n"
|
||||
@@ -720,7 +770,7 @@
|
||||
cd
|
||||
|
||||
echo -e "******* PDFs *******"
|
||||
find ~/Code/ebook-* -name "*.pdf" -exec du -h {} \; -delete | sort -h
|
||||
find $HOME/Code/ebook-* -name "*.pdf" -exec du -h {} \; -delete | sort -h
|
||||
|
||||
echo -e "\n*** Done! ***"
|
||||
}
|
||||
@@ -779,23 +829,12 @@
|
||||
alias chmod='chmod -c'
|
||||
alias_iftop: |
|
||||
alias iftop='sudo iftop'
|
||||
alias_ls: |
|
||||
alias l='ls'
|
||||
alias ll='ls -alh'
|
||||
alias lh='ls -ash'
|
||||
alias_progs: |
|
||||
alias progs='ps -ef'
|
||||
alias_nethogs: |
|
||||
alias nethogs='sudo nethogs'
|
||||
alias_ansible_facts: |
|
||||
alias ansible-facts='ansible localhost -m setup --connection=local'
|
||||
function_now: |
|
||||
function now {
|
||||
date "+%Y%m%d-%H%M%S"
|
||||
}
|
||||
function today {
|
||||
date "+%Y%m%d"
|
||||
}
|
||||
function_backup: |
|
||||
export BACKUP_DIR="/srv/backup"
|
||||
function backup {
|
||||
@@ -836,7 +875,7 @@
|
||||
rmdir -v tmp
|
||||
else
|
||||
echo "Failed!"
|
||||
mv tmp ~/TRASH/"tmp_`now`"
|
||||
mv tmp $HOME/TRASH/"tmp_`now`"
|
||||
fi
|
||||
}
|
||||
function pull_prod_backups {
|
||||
@@ -861,13 +900,6 @@
|
||||
alias prod-backup="pull_prod_backups"
|
||||
alias pull-prod="pull_prod_backups"
|
||||
alias prod-pull="pull_prod_backups"
|
||||
function_log: |
|
||||
function log {
|
||||
echo -e "$1"
|
||||
}
|
||||
function blog {
|
||||
echo -e "\n\n$1\n\n"
|
||||
}
|
||||
function_debian_upgrade: |
|
||||
function debian-upgrade {
|
||||
typeset -l OLD NEW
|
||||
@@ -941,8 +973,8 @@
|
||||
function_ebook_convert: |
|
||||
# Regenerate all eBook projects at once.
|
||||
function ebook-convert {
|
||||
find ~/Code/ebook-* -name "*.pdf" -print -delete
|
||||
find ~/Code/ebook-* -name convert.sh -print -exec bash "{}" \;
|
||||
find $HOME/Code/ebook-* -name "*.pdf" -print -delete
|
||||
find $HOME/Code/ebook-* -name convert.sh -print -exec bash "{}" \;
|
||||
}
|
||||
alias ebooks="ebook-convert"
|
||||
alias convert="ebook-convert"
|
||||
@@ -1012,7 +1044,7 @@
|
||||
alias reset-stage="load-branch stage main"
|
||||
alias reset-dev="load-branch dev main"
|
||||
function check-code-branches {
|
||||
for dir in ~/Code/*/; do
|
||||
for dir in $HOME/Code/*/; do
|
||||
cd $dir
|
||||
pwd
|
||||
git ls-remote --heads
|
||||
@@ -1024,7 +1056,7 @@
|
||||
alias check-branch="git ls-remote --heads"
|
||||
alias branch-check="check-branch"
|
||||
alias_reload_bash: |
|
||||
alias reload-bash="source ~/.bashrc"
|
||||
alias reload-bash="source $HOME/.bashrc"
|
||||
alias bash-reload="reload-bash"
|
||||
alias shell-reload="reload-bash"
|
||||
alias reload-shell="reload-bash"
|
||||
@@ -1063,9 +1095,36 @@
|
||||
status="$?"
|
||||
return "$status"
|
||||
}
|
||||
function_loop: |
|
||||
function loop {
|
||||
cmd="$1"
|
||||
while true; do
|
||||
$cmd
|
||||
done;
|
||||
}
|
||||
alias try="loop "
|
||||
source_shared: |
|
||||
if [ -f $HOME/.rc_shared ]; then
|
||||
source $HOME/.rc_shared
|
||||
fi
|
||||
process_notify_log: |
|
||||
if [[ -e {{ notify_log_file }} ]]; then
|
||||
cp "{{ notify_log_file }}" "{{ notify_log_file_wip }}" 1>/dev/null
|
||||
echo -n "" > "{{ notify_log_file }}"
|
||||
cat "{{ notify_log_file_wip }}" | while read title message; do
|
||||
notify-send "$title" "$message"
|
||||
done
|
||||
sh -c "rm '{{ notify_log_file_wip }}'"
|
||||
fi
|
||||
|
||||
|
||||
- name: General | Account Management | Users | Files | Common Variable
|
||||
set_fact:
|
||||
profile_common: |
|
||||
{{ export_path_additions }}
|
||||
{{ export_path_sbin }}
|
||||
{{ export_terminal }}
|
||||
{{ keyboard_settings}}
|
||||
rc_common: |
|
||||
# Fixes "command not found" when using aliases within functions.
|
||||
shopt -s expand_aliases
|
||||
@@ -1082,7 +1141,7 @@
|
||||
export server="{{ server }}"
|
||||
export domain="{{ domain }}"
|
||||
|
||||
{{ export_path_additions }}
|
||||
{{ source_shared }}
|
||||
{{ alias_cp }}
|
||||
{{ alias_mv }}
|
||||
{{ alias_rm }}
|
||||
@@ -1116,10 +1175,9 @@
|
||||
{{ function_code_reseed }}
|
||||
{{ function_clean_filenames }}
|
||||
{{ function_clean_filenames_tree }}
|
||||
{{ alias_clone }}
|
||||
{{ export_hyperling }}
|
||||
{{ source_docker_env }}
|
||||
{{ alias_scan }}
|
||||
{{ export_prod }}
|
||||
{{ alias_prod }}
|
||||
{{ function_clean_code }}
|
||||
{{ alias_kill_battery }}
|
||||
@@ -1128,14 +1186,11 @@
|
||||
{{ function_ansible_vars }}
|
||||
{{ alias_permission_commands }}
|
||||
{{ alias_iftop }}
|
||||
{{ alias_ls }}
|
||||
{{ alias_progs }}
|
||||
{{ alias_nethogs }}
|
||||
{{ alias_ansible_facts }}
|
||||
{{ function_now }}
|
||||
{{ function_backup }}
|
||||
{{ function_pull_prod_backups }}
|
||||
{{ function_log }}
|
||||
{{ function_debian_upgrade }}
|
||||
{{ function_ebook_convert }}
|
||||
{{ alias_sudo }}
|
||||
@@ -1146,22 +1201,46 @@
|
||||
{{ alias_docker_other }}
|
||||
{{ alias_flatpak_clean }}
|
||||
{{ alias_commit }}
|
||||
{{ function_loop }}
|
||||
{{ process_notify_log }}
|
||||
|
||||
- name: General | Account Management | Users | Files | .profile + .xsessionrc
|
||||
blockinfile:
|
||||
path: "{{ user_user.home }}/{{ item }}"
|
||||
block: |
|
||||
{{ profile_common }}
|
||||
|
||||
[[ $(whoami) != "root" ]] &&
|
||||
echo "`date` - Ansible .profile loaded successfully!"
|
||||
marker: '# {mark} MANAGED BY ANSIBLE | Aliases'
|
||||
state: present
|
||||
create: yes
|
||||
backup: no
|
||||
loop:
|
||||
- ".profile"
|
||||
- ".xprofile"
|
||||
- ".xsessionrc"
|
||||
when: user_user.home != ""
|
||||
|
||||
- name: General | Account Management | Users | Files | .bashrc
|
||||
blockinfile:
|
||||
path: "{{ item }}/.bashrc"
|
||||
block: |
|
||||
{{ profile_common }}
|
||||
{{ rc_common }}
|
||||
|
||||
# Export all functions! #
|
||||
eval "$(declare -F | grep -v _ | sed 's/-f /-fx /')"
|
||||
|
||||
[[ $(whoami) != "root" ]] &&
|
||||
echo "`date` - Ansible .bashrc loaded successfully!"
|
||||
marker: '# {mark} MANAGED BY ANSIBLE | Aliases'
|
||||
state: present
|
||||
create: yes
|
||||
backup: yes
|
||||
backup: no
|
||||
loop:
|
||||
- "{{ user_root.home }}"
|
||||
- "{{ user_user.home }}"
|
||||
ignore_errors: yes
|
||||
when: user_root.home != "" and user_user.home != ""
|
||||
|
||||
- name: General | Account Management | Users | Files | .zshrc
|
||||
@@ -1174,36 +1253,10 @@
|
||||
marker: '# {mark} MANAGED BY ANSIBLE | Aliases'
|
||||
state: present
|
||||
create: yes
|
||||
backup: yes
|
||||
backup: no
|
||||
loop:
|
||||
- "{{ user_root.home }}"
|
||||
- "{{ user_user.home }}"
|
||||
ignore_errors: yes
|
||||
when: user_root.home != "" and user_user.home != ""
|
||||
|
||||
- name: General | Account Management | Users | Files | .vimrc
|
||||
blockinfile:
|
||||
path: "{{ item }}/.vimrc"
|
||||
block: |
|
||||
" Turn off syntax, flashy lights, etc. Make VIM into a basic editor.
|
||||
syntax off
|
||||
set nohlsearch
|
||||
set noautoindent noautowrite noshowmatch wrapmargin=0 report=1 ts=3
|
||||
set ignorecase
|
||||
|
||||
" Turn off auto-commenting.
|
||||
autocmd Filetype * set fo-=c fo-=r fo-=o
|
||||
|
||||
" qq shortcut for immediately exiting all files without saving.
|
||||
nnoremap qq :qa!<cr>
|
||||
marker: '" {mark} MANAGED BY ANSIBLE | vimrc'
|
||||
state: present
|
||||
create: yes
|
||||
backup: yes
|
||||
loop:
|
||||
- "{{ user_root.home }}"
|
||||
- "{{ user_user.home }}"
|
||||
ignore_errors: yes
|
||||
when: user_root.home != "" and user_user.home != ""
|
||||
|
||||
- name: General | Account Management | Users | Files | Ownership
|
||||
@@ -1214,11 +1267,14 @@
|
||||
loop:
|
||||
- .bashrc
|
||||
- .zshrc
|
||||
- .vimrc
|
||||
- .profile
|
||||
- .xprofile
|
||||
- .xsessionrc
|
||||
|
||||
|
||||
- name: General | Account Management | Users | Files | Helper Functions (Reset)
|
||||
shell: "rm -v {{ global_bin }}/*.function"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: General | Account Management | Users | Files | Helper Functions
|
||||
copy:
|
||||
@@ -1229,3 +1285,52 @@
|
||||
mode: 0755
|
||||
with_fileglob:
|
||||
- "functions/*.function"
|
||||
|
||||
|
||||
# Shared Environment Setup #
|
||||
|
||||
- name: General | Account Management | Users | env-shared | Download / Update
|
||||
git:
|
||||
repo: https://git.hyperling.com/me/env-shared
|
||||
version: "{{ branch }}"
|
||||
dest: "{{ shared_rc_install_dir }}"
|
||||
clone: true
|
||||
force: true
|
||||
update: true
|
||||
#ignore_errors: yes
|
||||
|
||||
- name: General | Account Management | Users | env-shared | Install | .rc_shared
|
||||
copy:
|
||||
src: "{{ shared_rc_install_dir }}/rc_shared.sh"
|
||||
dest: "{{ item }}/.rc_shared"
|
||||
owner: root
|
||||
group: "{{ root_group }}"
|
||||
mode: 0755
|
||||
loop:
|
||||
- "{{ user_root.home }}"
|
||||
- "{{ user_user.home }}"
|
||||
#ignore_errors: yes
|
||||
when: user_root.home != "" and user_user.home != ""
|
||||
|
||||
- name: General | Account Management | Users | env-shared | Install | .vimrc
|
||||
copy:
|
||||
src: "{{ shared_rc_install_dir }}/vimrc.vim"
|
||||
dest: "{{ item }}/.vimrc"
|
||||
owner: root
|
||||
group: "{{ root_group }}"
|
||||
mode: 0755
|
||||
loop:
|
||||
- "{{ user_root.home }}"
|
||||
- "{{ user_user.home }}"
|
||||
#ignore_errors: yes
|
||||
when: user_root.home != "" and user_user.home != ""
|
||||
|
||||
- name: General | Account Management | Users | env-shared | Permissions
|
||||
file:
|
||||
path: "{{ user_user.home }}/{{ item }}"
|
||||
owner: "{{ user }}"
|
||||
mode: '0755'
|
||||
loop:
|
||||
- .rc_shared
|
||||
- .vimrc
|
||||
#ignore_errors: yes
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
# 20260716 - Hyperling
|
||||
# Ensure the correct International AltGr keyboard setting is always chosen.
|
||||
|
||||
- name: General | Settings | Keyboard | Default Config
|
||||
lineinfile:
|
||||
path: "/etc/default/keyboard"
|
||||
regexp: '{{ item.key }}'
|
||||
line: '{{ item.value }}'
|
||||
state: present
|
||||
create: yes
|
||||
backup: yes
|
||||
loop:
|
||||
#- { "key": '^[\#]?XKBMODEL', "value": 'XKBMODEL="pc105"'}
|
||||
- { "key": '^[\#]?XKBLAYOUT', "value": 'XKBLAYOUT="us"'}
|
||||
- { "key": '^[\#]?XKBVARIANT', "value": 'XKBVARIANT="altgr-intl"'}
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
# 20260731 - Hyperling
|
||||
# Install the AUR on pacman-related distros.
|
||||
|
||||
- name: General | Software | AUR | Facts 01
|
||||
set_fact:
|
||||
aur_user: aur-user
|
||||
aur_build_dir: ~/src
|
||||
aur_helper: yay
|
||||
aur_helper_url: https://aur.archlinux.org/yay-bin.git
|
||||
|
||||
- name: General | Software | AUR | Facts 02
|
||||
set_fact:
|
||||
aur_helper_dir: "{{ aur_build_dir }}/{{ aur_helper }}"
|
||||
|
||||
- name: General | Software | AUR | User
|
||||
user:
|
||||
name: "{{ aur_user }}"
|
||||
groups: wheel
|
||||
create_home: true
|
||||
|
||||
- name: General | Software | AUR | Sudoers
|
||||
lineinfile:
|
||||
path: /etc/sudoers.d/aurbuilder
|
||||
line: "{{ aur_user }} ALL=(ALL) NOPASSWD: /usr/bin/pacman"
|
||||
create: true
|
||||
mode: '0440'
|
||||
validate: 'visudo -cf %s'
|
||||
|
||||
- name: General | Software | AUR | Check
|
||||
command: "which {{ aur_helper }}"
|
||||
register: yay_check
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: General | Software | AUR | Install
|
||||
block:
|
||||
|
||||
- name: General | Software | AUR | Install | Clone Repo
|
||||
git:
|
||||
repo: "{{ aur_helper_url }}"
|
||||
dest: "{{ aur_helper_dir }}"
|
||||
|
||||
- name: General | Software | AUR | Install | Build & Integrate
|
||||
command: "cd {{ aur_helper_dir }} && makepkg -si --noconfirm"
|
||||
changed_when: true
|
||||
|
||||
when: yay_check.rc != 0
|
||||
become_user: "{{ aur_user }}"
|
||||
|
||||
@@ -5,6 +5,12 @@
|
||||
set_fact:
|
||||
metasploit_installer: msfinstall
|
||||
when: ansible_system in ("Linux", "Darwin")
|
||||
and pentesting == true
|
||||
|
||||
- name: General | Software | Metasploit | Check Install Status
|
||||
stat:
|
||||
path: /usr/bin/msfconsole
|
||||
register: metasploit_status
|
||||
|
||||
- name: General | Software | Metasploit | Refresh Apt Files
|
||||
shell: "{{ item }}"
|
||||
@@ -13,7 +19,9 @@
|
||||
- "mv -fv /usr/share/keyrings/metasploit-framework.gpg /tmp/apt/metasploit-framework.gpg.old"
|
||||
- "mv -fv /etc/apt/sources.list.d/metasploit-framework.list /tmp/apt/metasploit-framework.list.old"
|
||||
- "mv -fv /etc/apt/preferences.d/pin-metasploit.pref /tmp/apt/pin-metasploit.pref.old"
|
||||
when: ansible_system in ("Linux")
|
||||
when: ansible_system in ("Linux") and ansible_pkg_mgr == "apt"
|
||||
and not metasploit_status.stat.exists
|
||||
and pentesting == true
|
||||
ignore_errors: true
|
||||
|
||||
- name: General | Software | Metasploit | Install
|
||||
@@ -22,6 +30,24 @@
|
||||
- "curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > {{ metasploit_installer }}"
|
||||
- "chmod 755 {{ metasploit_installer }}"
|
||||
- "mkdir -p {{ global_bin }}"
|
||||
- "mv -fv ./msfinstall {{ global_bin }}/{{ metasploit_installer }}"
|
||||
- "mv -fv ./{{ metasploit_installer }} {{ global_bin }}/{{ metasploit_installer }}"
|
||||
- yes y | "{{ global_bin }}/{{ metasploit_installer }}"
|
||||
when: ansible_system in ("Linux", "Darwin")
|
||||
and not metasploit_status.stat.exists
|
||||
and pentesting == true
|
||||
|
||||
- name: General | Software | Metasploit | Remove (Darwin)
|
||||
shell: "{{ item }}"
|
||||
loop:
|
||||
- "/opt/metasploit-framework/bin/msfremove"
|
||||
when: ansible_system in ("Darwin")
|
||||
and not metasploit_status.stat.exists
|
||||
and pentesting == false
|
||||
|
||||
- name: General | Software | Metasploit | Remove
|
||||
package:
|
||||
name: "metasploit-framework"
|
||||
state: absent
|
||||
when: ansible_system in ("Linux")
|
||||
and metasploit_status.stat.exists
|
||||
and pentesting == false
|
||||
|
||||
@@ -60,6 +60,8 @@
|
||||
- "{{ nethogs }}"
|
||||
- "{{ ntp_server }}"
|
||||
- "{{ dig }}"
|
||||
- "{{ tmux }}"
|
||||
- "{{ base_devel }}"
|
||||
state: present
|
||||
|
||||
- name: General | Software | Packages | Install Software (DEV)
|
||||
@@ -91,13 +93,13 @@
|
||||
when: ansible_distribution == "Debian"
|
||||
ignore_errors: yes
|
||||
|
||||
- name: General | Software | Services | Install killall (Looking at you, Debian)
|
||||
- name: General | Software | Packages | Install killall (Looking at you, Debian)
|
||||
package:
|
||||
name: psmisc
|
||||
state: present
|
||||
when: ansible_distribution == "Debian"
|
||||
|
||||
- name: General | Software | Services | Install "Bloat" (Looking at you, Arch Base)
|
||||
- name: General | Software | Packages | Install "Bloat" (Looking at you, Arch Base)
|
||||
package:
|
||||
name:
|
||||
- which
|
||||
@@ -105,7 +107,7 @@
|
||||
state: present
|
||||
when: ansible_distribution == "Archlinux"
|
||||
|
||||
- name: General | Software | Services | Install Fix (Looking at you, openSUSE)
|
||||
- name: General | Software | Packages | Install Fix (Looking at you, openSUSE)
|
||||
package:
|
||||
name:
|
||||
# openSUSE Tumbleweed comes without gnome-control-center being able to open
|
||||
@@ -134,7 +136,7 @@
|
||||
state: absent
|
||||
|
||||
# Ubuntu still uses snap for critical components like GNOME, must keep.
|
||||
- name: General | Software | Services | Disable Snap Daemon
|
||||
- name: General | Software | Packages | Disable Snap Daemon
|
||||
service:
|
||||
name: snapd
|
||||
pattern: snapd
|
||||
|
||||
@@ -10,30 +10,20 @@
|
||||
state: started
|
||||
enabled: yes
|
||||
when: ansible_virtualization_type != 'docker'
|
||||
and ansible_service_mgr != "runit"
|
||||
register: cron_status
|
||||
until: cron_status.state == "started"
|
||||
retries: 3
|
||||
delay: 3
|
||||
|
||||
|
||||
## CUPS ##
|
||||
|
||||
- name: General | Software | Services | CUPS | Disable
|
||||
- name: General | Software | Services | CROND | Enable (runit)
|
||||
service:
|
||||
name: "{{ cups }}"
|
||||
pattern: "{{ cups_pattern }}"
|
||||
state: stopped
|
||||
enabled: no
|
||||
ignore_errors: yes
|
||||
|
||||
- name: General | Software | Services | CUPS-Browse | Disable
|
||||
service:
|
||||
name: "{{ cups_browse }}"
|
||||
pattern: "{{ cups_browse_pattern }}"
|
||||
state: stopped
|
||||
enabled: no
|
||||
ignore_errors: yes
|
||||
|
||||
name: "{{ crond }}"
|
||||
state: started
|
||||
enabled: yes
|
||||
when: ansible_virtualization_type != 'docker'
|
||||
and ansible_service_mgr == "runit"
|
||||
ignore_errors: true # Service module seems experimental for this init system.
|
||||
|
||||
## SSHD ##
|
||||
|
||||
@@ -82,30 +72,31 @@
|
||||
state: reloaded
|
||||
enabled: yes
|
||||
when: ansible_virtualization_type != 'docker'
|
||||
and ansible_service_mgr != "runit"
|
||||
register: sshd_status
|
||||
until: sshd_status.state == "started"
|
||||
retries: 3
|
||||
delay: 3
|
||||
|
||||
|
||||
## JournalCTL ##
|
||||
|
||||
- name: General | Software | Services | JournalCTL | Reduce Log Size
|
||||
shell: journalctl --vacuum-size=100M
|
||||
when: ansible_system == "Linux"
|
||||
and ansible_service_mgr == "systemd"
|
||||
ignore_errors: yes
|
||||
|
||||
|
||||
## Bluetooth ##
|
||||
# Do people seriously depend on Bluetooth? Plug your devices in, silly!
|
||||
# Hehe, I use it now for a few rare things so disabling this for now.
|
||||
|
||||
- name: General | Software | Services | Bluetooth | Disable
|
||||
service:
|
||||
name: "{{ bluetooth }}"
|
||||
pattern: "{{ bluetooth_pattern }}"
|
||||
state: stopped
|
||||
enabled: no
|
||||
ignore_errors: yes
|
||||
#- name: General | Software | Services | Bluetooth | Disable
|
||||
# service:
|
||||
# name: "{{ bluetooth }}"
|
||||
# pattern: "{{ bluetooth_pattern }}"
|
||||
# state: stopped
|
||||
# enabled: no
|
||||
# ignore_errors: yes
|
||||
|
||||
## NTP ##
|
||||
|
||||
@@ -116,6 +107,7 @@
|
||||
state: started
|
||||
enabled: yes
|
||||
when: ansible_virtualization_type != 'docker'
|
||||
and ansible_service_mgr != "runit"
|
||||
register: ntp_status
|
||||
until: ntp_status.state == "started"
|
||||
retries: 3
|
||||
@@ -127,3 +119,28 @@
|
||||
# Add a field to general.yml config file which gets applied via timedatectl and /etc/localtime.
|
||||
# Example of what to do to file:
|
||||
# /etc/localtime -> ../usr/share/zoneinfo/America/Phoenix
|
||||
|
||||
## Disable ##
|
||||
|
||||
- name: General | Software | Services | Disable
|
||||
service:
|
||||
name: "{{ item.name }}"
|
||||
pattern: "{{ item.pattern }}"
|
||||
state: stopped
|
||||
enabled: no
|
||||
ignore_errors: yes
|
||||
loop:
|
||||
- {name: "{{ cups }}" , pattern: "{{ cups_pattern }}"}
|
||||
- {name: "{{ cups_browse }}", pattern: "{{ cups_browse_pattern }}"}
|
||||
when: ansible_service_mgr != "runit"
|
||||
|
||||
- name: General | Software | Services | Disable (runit)
|
||||
service:
|
||||
name: "{{ item.name }}"
|
||||
state: stopped
|
||||
enabled: no
|
||||
ignore_errors: yes
|
||||
loop:
|
||||
- {name: "{{ cups }}" }
|
||||
- {name: "{{ cups_browse }}"}
|
||||
when: ansible_service_mgr = "runit"
|
||||
|
||||
@@ -5,7 +5,17 @@
|
||||
set_fact:
|
||||
services_report_file: "{{ user_user.home }}/Reports/{{ ansible_hostname }}.services.txt"
|
||||
services_enabled_file: "{{ user_user.home }}/Reports/{{ ansible_hostname }}.services-enabled.txt"
|
||||
services_command: "echo 'Service Manager {{ ansible_service_mgr }} Not Recognized'"
|
||||
|
||||
- name: General | Tests | Services | Set Facts | SystemD
|
||||
set_fact:
|
||||
services_command: "systemctl list-unit-files"
|
||||
when: ansible_service_mgr == "systemd"
|
||||
|
||||
- name: General | Tests | Services | Set Facts | runit
|
||||
set_fact:
|
||||
services_command: 'for s in /var/service/*; do sv status "$s"; done'
|
||||
when: ansible_service_mgr == "runit"
|
||||
|
||||
- name: General | Tests | Services | Create Main Report
|
||||
shell: "{{ item }}"
|
||||
|
||||
@@ -126,8 +126,6 @@
|
||||
- system-images;android-35;google_apis_playstore;x86_64
|
||||
### 34 ###
|
||||
- build-tools;34.0.0
|
||||
- platforms;android-34
|
||||
- sources;android-34
|
||||
# Images
|
||||
- system-images;android-34;google_apis;x86_64
|
||||
- system-images;android-34;google_apis_playstore;x86_64
|
||||
@@ -243,14 +241,20 @@
|
||||
|
||||
# These are safe to run multiple times, and uses the new `latest` version.
|
||||
- name: Workstation | Linux | Software | Android | Install | Required Modules
|
||||
shell: "yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
|
||||
shell: |
|
||||
if ! {{ android_sdkmanager_final }} --list_installed | grep -q '{{ item }}'; then
|
||||
yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}
|
||||
fi
|
||||
loop: "{{ android_downloads_required }}"
|
||||
become_user: "{{ user }}"
|
||||
when: coding == true
|
||||
|
||||
# Add more versions for testing across all the important platforms.
|
||||
- name: Workstation | Linux | Software | Android | Install | Additional Modules
|
||||
shell: "yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
|
||||
shell: |
|
||||
if ! {{ android_sdkmanager_final }} --list_installed | grep -q '{{ item }}'; then
|
||||
yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}
|
||||
fi
|
||||
loop: "{{ android_downloads_additional }}"
|
||||
become_user: "{{ user }}"
|
||||
when: coding == true and sdks == true
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
# 20260716 - Hyperling
|
||||
# Begin customizing Cinnamon's dconf similar to GNOME.
|
||||
|
||||
# Favorites are handled in .config/cinnamon/spices/group*/*.json files.
|
||||
# Does not seem as easy as GNOME and its dconf settings.
|
||||
# Cinnamon does use some dconf though.
|
||||
|
||||
- name: Workstation | Linux | Software | Cinnamon | Facts | Defaults
|
||||
set_fact:
|
||||
cinnamon_package: cinnamon
|
||||
|
||||
- name: Workstation | Linux | Software | Cinnamon | Facts | Debian Derivitives
|
||||
set_fact:
|
||||
cinnamon_package: task-cinnamon-desktop
|
||||
when: ansible_distribution in ("Debian", "Devuan")
|
||||
|
||||
- name: Workstation | Linux | Software | Cinnamon | Install
|
||||
package:
|
||||
name:
|
||||
- "{{ cinnamon_package }}"
|
||||
- "{{ lightdm }}"
|
||||
state: present
|
||||
update_cache: yes
|
||||
@@ -44,11 +44,17 @@
|
||||
- { app: "com.transmissionbt.Transmission", name: "transmission", extra: "" }
|
||||
- { app: "app.grayjay.Grayjay", name: "grayjay", extra: "" }
|
||||
- { app: "com.github.xournalpp.xournalpp", name: "xournal", extra: "" }
|
||||
- { app: "network.loki.Session", name: "session", extra: "" }
|
||||
- { app: "com.brave.Browser", name: "brave", extra: "" }
|
||||
- { app: "net.ankiweb.Anki", name: "anki", extra: "" }
|
||||
- { app: "app.organicmaps.desktop", name: "organic-maps", extra: "" }
|
||||
- { app: "im.dino.Dino", name: "dino", extra: "" }
|
||||
flatpaks_coding:
|
||||
- { app: "com.vscodium.codium", name: "codium-flatpak", extra: "" }
|
||||
- { app: "com.google.AndroidStudio", name: "android-studio", extra: "" }
|
||||
- { app: "io.dbeaver.DBeaverCommunity", name: "dbeaver", extra: "" }
|
||||
- { app: "com.visualstudio.code-oss", name: "code-flatpak", extra: "" }
|
||||
- { app: "org.gnome.Boxes", name: "boxes", extra: "" }
|
||||
flatpaks_editing_video:
|
||||
- { app: "org.shotcut.Shotcut", name: "shotcut", extra: "" }
|
||||
- { app: "com.obsproject.Studio", name: "obs", extra: "" }
|
||||
@@ -57,6 +63,7 @@
|
||||
- { app: "org.tenacityaudio.Tenacity", name: "tenacity", extra: "" }
|
||||
- { app: "io.lmms.LMMS", name: "lmms", extra: "" }
|
||||
- { app: "net.sourceforge.VMPK", name: "vmpk", extra: "" }
|
||||
- { app: "org.musicbrainz.Picard", name: "picard", extra: "" }
|
||||
flatpaks_gaming:
|
||||
- { app: "com.valvesoftware.Steam", name: "steam", extra: "" }
|
||||
- { app: "com.play0ad.zeroad", name: "zeroad", extra: "" }
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
---
|
||||
# 20260716 - Hyperling
|
||||
# Add the setup for a simple i3 configuration. It´s pretty easy to use and
|
||||
# functions super well. Very easy to get going and does not need a whole lot of
|
||||
# work to change things around. Good alternative to DWM and so lightweight that
|
||||
# it doesn´t even matter if both are installed!!
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Facts | General [1/2]
|
||||
set_fact:
|
||||
i3_config: "settings/i3.config"
|
||||
i3_config_dir: "{{ user_user.home }}/.config/i3"
|
||||
i3_package: i3
|
||||
i3_light: light
|
||||
i3_files: thunar
|
||||
i3_term01: alacritty
|
||||
i3_term02: kitty
|
||||
i3_theming: lxappearance
|
||||
i3_theme01: greybird-gtk-theme
|
||||
i3_theme02: arc-theme
|
||||
i3_theme03: numix-gtk-theme
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Facts | General [1/2]
|
||||
set_fact:
|
||||
i3_config_file: "{{ i3_config_dir }}/config"
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Facts | pacman
|
||||
set_fact:
|
||||
i3_theme01: htop
|
||||
i3_theme02: htop
|
||||
i3_theme03: htop
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Facts | yay
|
||||
set_fact:
|
||||
i3_yay_packages:
|
||||
- greybird-gtk-theme
|
||||
- enlightenment-arc-theme
|
||||
- numix-gtk-theme
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
|
||||
#- name: Workstation | Linux | Software | i3 | Facts | TBD
|
||||
# set_fact:
|
||||
# i3_package: i3-wm
|
||||
# when: ansible_distribution in ("TBD")
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Install
|
||||
package:
|
||||
name:
|
||||
- "{{ i3_package }}"
|
||||
- "{{ lightdm }}"
|
||||
- "{{ i3_light }}"
|
||||
- "{{ i3_files }}"
|
||||
- "{{ i3_term01 }}"
|
||||
- "{{ i3_term02 }}"
|
||||
- "{{ i3_theming }}"
|
||||
- "{{ i3_theme01 }}"
|
||||
- "{{ i3_theme02 }}"
|
||||
- "{{ i3_theme03 }}"
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Install (yay)
|
||||
command: "yay --noconfirm -S {{ item }}"
|
||||
loop: "{{ i3_yay_packages }}"
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
become_user: "{{ aur_user }}"
|
||||
ignore_errors: true
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Config | Create Dir
|
||||
ansible.builtin.file:
|
||||
path: "{{ i3_config_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
owner: "{{ user }}"
|
||||
group: "{{ user }}"
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Config | Copy File
|
||||
copy:
|
||||
src: "{{ i3_config }}"
|
||||
dest: "{{ i3_config_file }}"
|
||||
owner: "{{ user }}"
|
||||
group: "{{ user }}"
|
||||
mode: '0664'
|
||||
|
||||
# TBD: Automate getting the brightness keys to work.
|
||||
#
|
||||
# User is already part of the video group. Just need to configure udev rules.
|
||||
#
|
||||
# Get the folder name from here: `ls /sys/class/backlight/`
|
||||
#
|
||||
# That is your <DEVICE> for the following lines, which go here: /etc/udev/rules.d/backlight.rules
|
||||
# ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="<DEVICE>", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
|
||||
# ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="<DEVICE>", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
|
||||
#
|
||||
# So, for example:
|
||||
# [18:12:20 root@device ~]# cat /etc/udev/rules.d/backlight.rules
|
||||
# ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
|
||||
# ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
|
||||
# [18:12:21 root@device ~]#
|
||||
#
|
||||
# It then required a reboot. Doing the commands below was not enough.
|
||||
#
|
||||
# # sudo udevadm control --reload-rules
|
||||
# # sudo udevadm trigger
|
||||
#
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Light | Check Backlights
|
||||
ansible.builtin.find:
|
||||
paths: /sys/class/backlight
|
||||
file_type: any # Options: file, directory, any
|
||||
patterns: "*" # Wildcard patterns (e.g., "*.log")
|
||||
recurse: no # Set to 'yes' for subdirectories
|
||||
register: i3_light_device_check
|
||||
|
||||
#- name: Display var _ DELETEME
|
||||
# ansible.builtin.debug:
|
||||
# msg: "{{ i3_light_device_check }}"
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Light | Pull Backlight Name
|
||||
set_fact:
|
||||
i3_light_device_name: "{{ i3_light_device_check.files[0].path | basename }}"
|
||||
|
||||
#- name: Display var - DELETEME
|
||||
# ansible.builtin.debug:
|
||||
# msg: "{{ i3_light_device_name }}"
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Light | udev Rules | Create
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/udev/rules.d/backlight.rules
|
||||
content: |
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="{{ i3_light_device_name }}", RUN+="/bin/chgrp video /sys/class/backlight/%k/brightness"
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="{{ i3_light_device_name }}", RUN+="/bin/chmod g+w /sys/class/backlight/%k/brightness"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
|
||||
- name: Workstation | Linux | Software | i3 | Light | udev Rules | Reload
|
||||
command: "{{ item }}"
|
||||
loop:
|
||||
- udevadm control --reload-rules
|
||||
- udevadm trigger
|
||||
|
||||
#- name: FAIL - DELETEME
|
||||
# meta: end_play
|
||||
|
||||
@@ -2,6 +2,17 @@
|
||||
# Lutris for running Windows games not in Steam.
|
||||
# https://lutris.net/downloads
|
||||
|
||||
## Starcraft 2 ##
|
||||
# 2026-05-06: #
|
||||
# Using "System (10.0 (Debian 10.0-repack-6))" works, not Proton.
|
||||
# - Fails to actually open SC2, but Battle.net worss great, lol.
|
||||
# does not get to login, pop-up freezes
|
||||
# - wine 8
|
||||
# - proton hotfix
|
||||
# - proton exp
|
||||
# - proton GE stabele / default
|
||||
# - proton 9 (beta)
|
||||
|
||||
# Paths
|
||||
|
||||
- name: Workstation | Linux | Software | Lutris | Facts
|
||||
@@ -34,10 +45,10 @@
|
||||
- name: Workstation | Linux | Software | Lutris | Add PPA (Debian)
|
||||
shell: "{{ item }}"
|
||||
loop:
|
||||
- "wget -q -O- https://download.opensuse.org/repositories/home:/strycore/Debian_12/Release.key \
|
||||
- "wget -q -O- https://download.opensuse.org/repositories/home:/strycore/Debian_13/Release.key \
|
||||
| gpg --dearmor \
|
||||
| sudo tee {{ lutris_keyfile }} > /dev/null"
|
||||
- "echo 'deb [signed-by={{ lutris_keyfile }}] https://download.opensuse.org/repositories/home:/strycore/Debian_12/ ./' \
|
||||
- "echo 'deb [signed-by={{ lutris_keyfile }}] https://download.opensuse.org/repositories/home:/strycore/Debian_13/ ./' \
|
||||
| sudo tee {{ lutris_source_list }} > /dev/null"
|
||||
- "sudo apt update"
|
||||
when: ansible_distribution in ("Debian") and gaming == true and not lutris_source_exists.stat.exists
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
# 20260716 - Hyperling
|
||||
# Giving this DE a shot but not liking it as much as others.
|
||||
|
||||
- name: Workstation | Linux | Software | LXQt | Facts | Defaults
|
||||
set_fact:
|
||||
lxqt_package: lxqt
|
||||
|
||||
- name: Workstation | Linux | Software | LXQt | Facts | Debian Derivitives
|
||||
set_fact:
|
||||
lxqt_package: task-lxqt-desktop
|
||||
when: ansible_distribution in ("Debian", "Devuan")
|
||||
|
||||
- name: Workstation | Linux | Software | LXQt | Install
|
||||
package:
|
||||
name:
|
||||
- "{{ lxqt_package }}"
|
||||
- "{{ sddm }}"
|
||||
state: present
|
||||
update_cache: yes
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
# 20260730 - Hyperling
|
||||
# Install much more recent Node versions.
|
||||
|
||||
# https://linuxcapable.com/how-to-install-node-js-on-debian-linux/
|
||||
|
||||
- name: Workstation | Software | NodeJS
|
||||
block:
|
||||
|
||||
- name: Workstation | Software | NodeJS | Facts
|
||||
set_fact:
|
||||
node_version: node_24.x
|
||||
|
||||
- name: Workstation | Software | NodeJS | Old | Remove
|
||||
package:
|
||||
name: npm
|
||||
state: absent
|
||||
|
||||
- name: Workstation | Software | NodeJS | extrepo | Install
|
||||
package:
|
||||
name: extrepo
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
- name: Workstation | Software | NodeJS | extrepo | Enable {{ node_version }}
|
||||
shell: "extrepo enable {{ node_version }}"
|
||||
|
||||
- name: Workstation | Software | NodeJS | Install
|
||||
package:
|
||||
name: nodejs
|
||||
state: latest
|
||||
update_cache: yes
|
||||
|
||||
when: ansible_pkg_mgr == "apt"
|
||||
and coding == true
|
||||
@@ -40,6 +40,7 @@
|
||||
- "{{ evolution }}*"
|
||||
- gparted
|
||||
- hugo
|
||||
- wireless-tools
|
||||
state: present
|
||||
|
||||
- name: Workstation | Linux | Software | Packages | GS Connect (KDE Connect, Android Tool)
|
||||
@@ -56,7 +57,7 @@
|
||||
package:
|
||||
name:
|
||||
- "{{ firefox }}"
|
||||
- "{{ firefox_esr }}"
|
||||
#- "{{ firefox_esr }}"
|
||||
- "{{ thunderbird }}"
|
||||
- steam
|
||||
- vscode
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
---
|
||||
# 20260716 - Hyperling
|
||||
# Attempt to save battery life by having a daemon tune the CPU and disable
|
||||
# unneeded components like USB, Bluetooth, WiFi, etc when not in use.
|
||||
|
||||
## Variables ##
|
||||
|
||||
- name: Workstation | Linux | Software | TLP | Facts
|
||||
set_fact:
|
||||
tlp: "tlp"
|
||||
tlp_rdw: "tlp-rdw"
|
||||
tlp_smart: "smartmontools"
|
||||
tlp_config: "/etc/tlp.conf"
|
||||
tlp_service: "tlp"
|
||||
ppd_package: "power-profiles-daemon"
|
||||
ppd_service: "power-profiles-daemon"
|
||||
acf_package: "auto-cpufreq"
|
||||
acf_service: "auto-cpufreq"
|
||||
|
||||
## Conflicts ##
|
||||
|
||||
#- name: Workstation | Linux | Software | TLP | Conflicts | Disable
|
||||
# service:
|
||||
# name: "{{ item }}"
|
||||
# state: stopped
|
||||
# enabled: false
|
||||
# loop:
|
||||
# - "{{ ppd_service }}"
|
||||
# - "{{ acf_service }}"
|
||||
# ignore_errors: yes
|
||||
|
||||
- name: Workstation | Linux | Software | TLP | Conflicts | Remove
|
||||
package:
|
||||
name:
|
||||
- "{{ ppd_package }}"
|
||||
- "{{ acf_package }}"
|
||||
state: absent
|
||||
|
||||
## Install TLP + Associated Software ##
|
||||
|
||||
- name: Workstation | Linux | Software | TLP | Install
|
||||
package:
|
||||
name:
|
||||
- "{{ tlp }}"
|
||||
- "{{ tlp_rdw }}"
|
||||
- "{{ tlp_smart }}"
|
||||
update_cache: yes
|
||||
|
||||
## Configuration ##
|
||||
|
||||
# Device choices:
|
||||
# - bluetooth
|
||||
# - nfc
|
||||
# - wifi
|
||||
# - wwan
|
||||
|
||||
# Bluetooth and WiFi are not always used so disable on boot.
|
||||
# NFC and WWAN (cellular) are never used so always disable.
|
||||
|
||||
- name: Workstation | Linux | Software | TLP | Config
|
||||
lineinfile:
|
||||
path: "{{ tlp_config }}"
|
||||
regexp: '{{ item.key }}'
|
||||
line: '{{ item.value }} # MANAGED BY ANSIBLE'
|
||||
state: present
|
||||
create: yes
|
||||
backup: yes
|
||||
loop:
|
||||
- { "key": '^[\#]?DEVICES_TO_DISABLE_ON_STARTUP', "value": 'DEVICES_TO_DISABLE_ON_STARTUP="bluetooth nfc wwan"'}
|
||||
# Ensure these stay commented, once the device is booted the user is in control. #
|
||||
- { "key": '^[\#]?DEVICES_TO_ENABLE_ON_STARTUP', "value": '#DEVICES_TO_ENABLE_ON_STARTUP=""'}
|
||||
- { "key": '^[\#]?DEVICES_TO_ENABLE_ON_AC', "value": '#DEVICES_TO_ENABLE_ON_AC=""'}
|
||||
- { "key": '^[\#]?DEVICES_TO_DISABLE_ON_BAT', "value": '#DEVICES_TO_DISABLE_ON_BAT=""'}
|
||||
# Help preserve battery life by not fully charging. #
|
||||
- { "key": '^[\#]?START_CHARGE_THRESH_BAT0', "value": '{{ "" if battery else "#" }}START_CHARGE_THRESH_BAT0=60'}
|
||||
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT0', "value": '{{ "" if battery else "#" }}STOP_CHARGE_THRESH_BAT0=80'}
|
||||
- { "key": '^[\#]?START_CHARGE_THRESH_BAT1', "value": '{{ "" if battery else "#" }}START_CHARGE_THRESH_BAT1=60'}
|
||||
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT1', "value": '{{ "" if battery else "#" }}STOP_CHARGE_THRESH_BAT1=80'}
|
||||
|
||||
## Enable + Start ##
|
||||
|
||||
# Ensure the service is running and will run after reboot.
|
||||
|
||||
- name: Workstation | Linux | Software | TLP | Enable + Start
|
||||
service:
|
||||
name: "{{ tlp_service }}"
|
||||
state: started
|
||||
enabled: true
|
||||
when: ansible_service_mgr != "runit" # TBD: Figure out how to do this on runit.
|
||||
@@ -1,23 +1,53 @@
|
||||
---
|
||||
# Install VPN client(s).
|
||||
# https://mullvad.net/en/help/install-mullvad-app-linux
|
||||
|
||||
- name: Workstation | Software | VPN | Add Mullvad Repo [apt]
|
||||
shell: "{{ item }}"
|
||||
loop:
|
||||
- sudo curl -fsSLo /usr/share/keyrings/mullvad-keyring.asc https://repository.mullvad.net/deb/mullvad-keyring.asc
|
||||
- echo "deb [signed-by=/usr/share/keyrings/mullvad-keyring.asc arch=$( dpkg --print-architecture )] https://repository.mullvad.net/deb/stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/mullvad.list
|
||||
- apt update
|
||||
when: ansible_pkg_mgr == "apt"
|
||||
- name: Workstation | Software | VPN | Mullvad
|
||||
block:
|
||||
|
||||
- name: Workstation | Software | VPN | Add Mullvad Repo [dnf]
|
||||
shell: "{{ item }}"
|
||||
loop:
|
||||
- sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo
|
||||
when: ansible_pkg_mgr == "dnf"
|
||||
# https://mullvad.net/en/help/install-mullvad-app-linux
|
||||
|
||||
- name: Workstation | Software | VPN | Install
|
||||
package:
|
||||
name:
|
||||
- mullvad-vpn
|
||||
state: present
|
||||
- name: Workstation | Software | VPN | Mullvad | Add Repo [apt]
|
||||
shell: "{{ item }}"
|
||||
loop:
|
||||
- sudo curl -fsSLo /usr/share/keyrings/mullvad-keyring.asc https://repository.mullvad.net/deb/mullvad-keyring.asc
|
||||
- echo "deb [signed-by=/usr/share/keyrings/mullvad-keyring.asc arch=$( dpkg --print-architecture )] https://repository.mullvad.net/deb/stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/mullvad.list
|
||||
- apt update
|
||||
when: ansible_pkg_mgr == "apt"
|
||||
|
||||
- name: Workstation | Software | VPN | Mullvad | Add Repo [dnf]
|
||||
shell: "{{ item }}"
|
||||
loop:
|
||||
- sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo
|
||||
when: ansible_pkg_mgr == "dnf"
|
||||
|
||||
- name: Workstation | Software | VPN | Install
|
||||
package:
|
||||
name:
|
||||
- mullvad-vpn
|
||||
state: present
|
||||
|
||||
- name: Workstation | Software | VPN | Install (Artix, runit)
|
||||
package:
|
||||
name:
|
||||
- mullvad-vpn-runit
|
||||
state: present
|
||||
when: ansible_distribution == "Artix"
|
||||
and ansible_service_mgr == "runit"
|
||||
|
||||
- name: Workstation | Software | VPN | Mullvad | Symlink GUI
|
||||
ansible.builtin.file:
|
||||
src: "/opt/Mullvad VPN/mullvad-vpn"
|
||||
dest: "{{ global_bin }}/mullvad-vpn"
|
||||
state: link
|
||||
force: true
|
||||
|
||||
- name: Workstation | Software | VPN | Mullvad | Enable (Artix, runit)
|
||||
ansible.builtin.file:
|
||||
src: "/etc/runit/sv/mullvad-daemon"
|
||||
dest: "/run/runit/services/mullvad"
|
||||
state: link
|
||||
force: true
|
||||
|
||||
when: ansible_distribution in ("Debian", "Ubuntu", "Arch", "Artix")
|
||||
|
||||
# TBD: VPNs for distros like Devuan.
|
||||
|
||||
@@ -7,64 +7,72 @@
|
||||
# This also exists but was not utilized:
|
||||
# https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo
|
||||
|
||||
## Facts ##
|
||||
- name: Workstation | Linux | Software | VS Codium
|
||||
block:
|
||||
|
||||
## Facts ##
|
||||
|
||||
# Paths
|
||||
|
||||
- name: Workstation | Linux | Software | VS Codium | Facts
|
||||
set_fact:
|
||||
vscodium_source_list: "/etc/apt/sources.list.d/vscodium.list"
|
||||
vscodium_keyfile: "/usr/share/keyrings/vscodium.gpg"
|
||||
|
||||
# Checks
|
||||
|
||||
- name: Workstation | Linux | Software | VS Codium | Check PPA
|
||||
stat:
|
||||
path: "{{ vscodium_source_list }}"
|
||||
get_attributes: false
|
||||
get_checksum: false
|
||||
get_mime: false
|
||||
register: vscodium_source_exists
|
||||
|
||||
## Install Repo ##
|
||||
|
||||
- name: Workstation | Linux | Software | VS Codium | Add PPA
|
||||
shell: "{{ item }}"
|
||||
loop:
|
||||
- "wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \
|
||||
| gpg --dearmor \
|
||||
| sudo tee {{ vscodium_keyfile }} > /dev/null"
|
||||
- "echo 'deb [arch=amd64,arm64 signed-by={{ vscodium_keyfile }}] https://download.vscodium.com/debs vscodium main' \
|
||||
| sudo tee {{ vscodium_source_list }}"
|
||||
- "sudo apt update"
|
||||
when: coding == true
|
||||
and not vscodium_source_exists.stat.exists
|
||||
|
||||
## Install Package ##
|
||||
|
||||
- name: Workstation | Linux | Software | VS Codium | Install
|
||||
package:
|
||||
name:
|
||||
- codium
|
||||
state: present
|
||||
when: ansible_pkg_mgr == "apt"
|
||||
and coding == true
|
||||
|
||||
## Remove Package ##
|
||||
|
||||
- name: Workstation | Linux | Software | VS Codium | Uninstall
|
||||
package:
|
||||
name:
|
||||
- codium
|
||||
state: absent
|
||||
when: coding != true
|
||||
|
||||
## Remove Repo ##
|
||||
|
||||
- name: Workstation | Linux | Software | VS Codium | Remove PPA
|
||||
shell: "{{ item }}"
|
||||
loop:
|
||||
- "mv {{ vscodium_source_list }} ~/TRASH/"
|
||||
- "mv /etc/apt/keyrings/vscodium*.gpg ~/TRASH/"
|
||||
- "sudo apt update"
|
||||
when: coding != true
|
||||
and vscodium_source_exists.stat.exists
|
||||
|
||||
# Paths
|
||||
|
||||
- name: Workstation | Linux | Software | VS Codium | Facts
|
||||
set_fact:
|
||||
vscodium_source_list: "/etc/apt/sources.list.d/vscodium.list"
|
||||
vscodium_keyfile: "/usr/share/keyrings/vscodium.gpg"
|
||||
when: ansible_pkg_mgr == "apt"
|
||||
|
||||
# Checks
|
||||
|
||||
- name: Workstation | Linux | Software | VS Codium | Check PPA
|
||||
stat:
|
||||
path: "{{ vscodium_source_list }}"
|
||||
get_attributes: false
|
||||
get_checksum: false
|
||||
get_mime: false
|
||||
register: vscodium_source_exists
|
||||
when: ansible_pkg_mgr == "apt"
|
||||
|
||||
## Install Repo ##
|
||||
|
||||
- name: Workstation | Linux | Software | VS Codium | Add PPA
|
||||
shell: "{{ item }}"
|
||||
loop:
|
||||
- "wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \
|
||||
| gpg --dearmor \
|
||||
| sudo tee {{ vscodium_keyfile }} > /dev/null"
|
||||
- "echo 'deb [arch=amd64,arm64 signed-by={{ vscodium_keyfile }}] https://download.vscodium.com/debs vscodium main' \
|
||||
| sudo tee {{ vscodium_source_list }}"
|
||||
- "sudo apt update"
|
||||
when: ansible_pkg_mgr == "apt" and coding == true and not vscodium_source_exists.stat.exists
|
||||
|
||||
## Install Package ##
|
||||
|
||||
- name: Workstation | Linux | Software | VS Codium | Install
|
||||
package:
|
||||
name:
|
||||
- codium
|
||||
state: present
|
||||
when: ansible_pkg_mgr == "apt" and coding == true
|
||||
|
||||
## Remove Package ##
|
||||
|
||||
- name: Workstation | Linux | Software | VS Codium | Uninstall
|
||||
package:
|
||||
name:
|
||||
- codium
|
||||
state: absent
|
||||
when: ansible_pkg_mgr == "apt" and coding != true
|
||||
|
||||
## Remove Repo ##
|
||||
|
||||
- name: Workstation | Linux | Software | VS Codium | Remove PPA
|
||||
shell: "{{ item }}"
|
||||
loop:
|
||||
- "mv {{ vscodium_source_list }} ~/TRASH/"
|
||||
- "mv /etc/apt/keyrings/vscodium*.gpg ~/TRASH/"
|
||||
- "sudo apt update"
|
||||
when: ansible_pkg_mgr == "apt" and coding != true and vscodium_source_exists.stat.exists
|
||||
and ansible_distribution in ("Debian", "Ubuntu")
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# TBD:
|
||||
# - Decide whether this should be added to local.yml since wall does not work with gnome-terminal.
|
||||
---
|
||||
|
||||
- name: Workstation | Shared | Cron | Root | Shutdown Warnings
|
||||
cron:
|
||||
user: root
|
||||
name: "Shutdown Warnings"
|
||||
minute: "*"
|
||||
hour: "19-23"
|
||||
job: /usr/bin/wall "Shutting down soon! Please save your work!" && /usr/sbin/shutdown --show
|
||||
state: present
|
||||
|
||||
- name: Workstation | Shared | Cron | Root | Shutdown
|
||||
cron:
|
||||
user: root
|
||||
name: "Shutdown"
|
||||
minute: "*/5"
|
||||
hour: "20-23"
|
||||
job: /usr/sbin/shutdown -h 4
|
||||
state: present
|
||||
@@ -0,0 +1,338 @@
|
||||
---
|
||||
# 20260731 - Hyperling
|
||||
# Cinnakon settings, copied from GNOME settings.
|
||||
|
||||
# Temporarily removed while it's broken:
|
||||
# , 'com.vscodium.codium.desktop', 'codium.desktop'
|
||||
- name: Workstation | Account Management | Cinnamon | Facts
|
||||
set_fact:
|
||||
# Only do multiple entries per line if they are for the same exact program.
|
||||
cinnamon_favorites: "[ 'org.gnome.Terminal.desktop'
|
||||
, 'org.gnome.Console.desktop'
|
||||
, 'gnome-system-monitor.desktop', 'org.gnome.SystemMonitor.desktop'
|
||||
, 'org.gnome.Nautilus.desktop'
|
||||
, 'io.gitlab.librewolf-community.desktop', 'librewolf.desktop'
|
||||
, 'org.mozilla.firefox.desktop', 'firefox.desktop'
|
||||
, 'com.vscodium.codium.desktop'
|
||||
, 'codium.desktop'
|
||||
, 'org.shotcut.Shotcut.desktop'
|
||||
, 'io.lmms.LMMS.desktop'
|
||||
, 'app.grayjay.Grayjay.desktop'
|
||||
, 'io.lbry.lbry-app.desktop', 'lbry.desktop'
|
||||
, 'com.valvesoftware.Steam.desktop'
|
||||
, 'net.lutris.Lutris.desktop'
|
||||
, 'mullvad-vpn.desktop'
|
||||
, 'network.loki.Session.desktop'
|
||||
, 'org.signal.Signal.desktop', 'signal-desktop.desktop'
|
||||
, 'org.telegram.desktop.desktop'
|
||||
, 'com.discordapp.Discord.desktop'
|
||||
]"
|
||||
dconf_terminal: gnome-terminal
|
||||
dconf_theme: Adwaita-dark
|
||||
dconf_icons: Adwaita
|
||||
# 2024-01-28 Not currently using local email clients.
|
||||
#, 'org.gnome.Evolution.desktop'
|
||||
#, 'chat.delta.desktop.desktop', 'deltachat.desktop'
|
||||
#, 'org.gnome.Geary.desktop'
|
||||
#, 'org.mozilla.Thunderbird.desktop'
|
||||
# 2025-01-01
|
||||
# Reduce the amount of icons on the sidebar, things that may get added back.
|
||||
#, 'org.godotengine.Godot.desktop'
|
||||
# 2025-03-07 Removed in place of a 2nd VS Codium install (apt version).
|
||||
#, 'com.visualstudio.code-oss.desktop', 'code-oss.desktop'
|
||||
# 2025-03-21 Not really using Android Studio now that Flutter is working.
|
||||
#, 'com.google.AndroidStudio.desktop'
|
||||
# 2025-08-31 Not used a whole lot, installed again just to explore.
|
||||
#, 'im.riot.Riot.desktop'
|
||||
#, 'chat.simplex.simplex.desktop'
|
||||
|
||||
- name: Workstation | Account Management | Cinnamon | Facts (NixOS)
|
||||
set_fact:
|
||||
dconf_terminal: kgx
|
||||
when: ansible_distribution in ("NixOS")
|
||||
|
||||
- name: Workstation | Account Management | Cinnamon | Facts (Ubuntu)
|
||||
set_fact:
|
||||
dconf_theme: Yaru-purple-dark
|
||||
dconf_icons: Yaru-purple-dark
|
||||
when: ansible_distribution in ("Ubuntu")
|
||||
|
||||
# Make sure Gnome-Tweaks is installed
|
||||
- name: Workstation | Account Management | Cinnamon | Install Dependencies
|
||||
package:
|
||||
name:
|
||||
- "{{ gnome_tweaks }}"
|
||||
- "{{ dconf_editor }}"
|
||||
- "{{ psutil }}"
|
||||
state: present
|
||||
when: ansible_distribution not in ("NixOS")
|
||||
|
||||
# Apply dconf settings through RC files due to distros without working psutil.
|
||||
# Use the command 'dconf watch /' then change settings to see find these values.
|
||||
- name: Workstation | Account Management | Cinnamon | Settings
|
||||
blockinfile:
|
||||
path: "{{ user_user.home }}/{{ item }}"
|
||||
block: |
|
||||
# Disable Cinnamon Settings While Converting From GNOME
|
||||
if [[ 1 == 0 ]]; then
|
||||
|
||||
## Temporary Variables + Functions ##
|
||||
|
||||
dconf_count=1
|
||||
function inc_dconf() {
|
||||
dconf_count=$(( dconf_count + 1 ))
|
||||
}
|
||||
|
||||
## Dash to Dock ##
|
||||
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-position \
|
||||
"'LEFT'" && inc_dconf &&
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-fixed \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/dash-max-icon-size \
|
||||
24 && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/shell/favorite-apps \
|
||||
"{{ gnome_favorites }}" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/apply-custom-theme \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/custom-theme-shrink \
|
||||
true && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-fixed \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/intellihide-mode \
|
||||
"'ALL_WINDOWS'" && inc_dconf &&
|
||||
|
||||
## Generic ##
|
||||
|
||||
dconf write /org/gnome/desktop/interface/color-scheme \
|
||||
"'prefer-dark'" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/gtk-theme \
|
||||
"'{{ dconf_theme }}'" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/icon-theme \
|
||||
"'{{ dconf_icons }}'" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/interface/clock-show-date \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/clock-format \
|
||||
"'24h'" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/clock-show-seconds \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/clock-show-weekday \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/calendar/show-weekdate \
|
||||
true && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/interface/show-battery-percentage \
|
||||
true && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/wm/preferences/button-layout \
|
||||
"'appmenu:minimize,maximize,close'" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/wm/preferences/num-workspaces \
|
||||
1 && inc_dconf &&
|
||||
dconf write /org/gnome/mutter/dynamic-workspaces \
|
||||
false && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/mutter/edge-tiling \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/enable-hot-corners \
|
||||
false && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/mutter/center-new-windows \
|
||||
true && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/notifications/show-banners \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution-alarm-notify/enable-sound-alerts \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution-alarm-notify/enable \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution/enable-sound-alerts \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution/enable \
|
||||
false && inc_dconf &&
|
||||
|
||||
# Stop Update Notifications
|
||||
|
||||
dconf write /org/gnome/software/allow-updates \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/software/download-updates \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/software/download-updates-notify \
|
||||
false && inc_dconf &&
|
||||
|
||||
# Red Mode (Night Light)
|
||||
(
|
||||
typeset -l redmode
|
||||
redmode="{{ redmode }}"
|
||||
if [[ $redmode == "true" ]]; then
|
||||
dconf write /org/gnome/settings-daemon/plugins/color/night-light-enabled \
|
||||
true && inc_dconf
|
||||
fi
|
||||
) &&
|
||||
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-automatic \
|
||||
false && inc_dconf &&
|
||||
#dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-from \
|
||||
# 2.0 && inc_dconf &&
|
||||
#dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-to \
|
||||
# 1.99 && inc_dconf &&
|
||||
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-from \
|
||||
19.00 && inc_dconf &&
|
||||
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-to \
|
||||
07.00 && inc_dconf &&
|
||||
|
||||
# 1700 is max through GNOME Settings, looks pretty red but can still see green vs blue.
|
||||
# 1200 is max on f.lux type apps, pretty difficult to see the difference between green and blue.
|
||||
# 0500 is the max on Red Moon, super intense on a laptop, not as much on a phone screen.
|
||||
# - Basically makes everything like the dash of a Z31 300ZX, lol.
|
||||
dconf write /org/gnome/settings-daemon/plugins/color/night-light-temperature \
|
||||
"uint32 1700" && inc_dconf &&
|
||||
|
||||
## Keyboard Shortcuts ##
|
||||
|
||||
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/binding \
|
||||
"'<Control><Alt>t'" && inc_dconf &&
|
||||
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/command \
|
||||
"'{{ dconf_terminal }}'" && inc_dconf &&
|
||||
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/name \
|
||||
"'Open Terminal'" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/binding \
|
||||
"'<Super>t'" && inc_dconf &&
|
||||
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/command \
|
||||
"'{{ dconf_terminal }}'" && inc_dconf &&
|
||||
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/name \
|
||||
"'Open Terminal 2'" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings "
|
||||
[ '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/'
|
||||
, '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/'
|
||||
]" && inc_dconf &&
|
||||
|
||||
## Privacy ##
|
||||
|
||||
dconf write /org/gnome/desktop/privacy/disable-camera \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/privacy/disable-microphone \
|
||||
true && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/privacy/recent-files-max-age \
|
||||
7 && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/privacy/remember-recent-files \
|
||||
false && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/privacy/old-files-age \
|
||||
"uint32 14" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/privacy/remove-old-trash-files \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/privacy/remove-old-temp-files \
|
||||
true && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/notifications/show-in-lock-screen \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/screensaver/lock-enabled \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/screensaver/lock-delay \
|
||||
"uint32 0" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/session/idle-delay \
|
||||
"uint32 900" && inc_dconf &&
|
||||
dconf write /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type \
|
||||
"'nothing'" && inc_dconf &&
|
||||
dconf write /org/gnome/settings-daemon/plugins/power/power-button-action \
|
||||
"'nothing'" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/media-handling/autorun-never \
|
||||
true && inc_dconf &&
|
||||
|
||||
## Gnome Terminal ##
|
||||
|
||||
# TBD: Do not start new tabs in previous tab's directory.
|
||||
# The profile ID is likely unique and will need to be retrieved first.
|
||||
#/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/preserve-working-directory
|
||||
#'never'
|
||||
|
||||
## Wellbeing ##
|
||||
|
||||
dconf write /org/gnome/desktop/screen-time-limits/daily-limit-enabled \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/screen-time-limits/daily-limit-seconds \
|
||||
"uint32 33333" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/screen-time-limits/grayscale \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/screen-time-limits/history-enabled \
|
||||
true && inc_dconf &&
|
||||
|
||||
#dconf write /org/gnome/desktop/break-reminders/selected-breaks \
|
||||
# "['eyesight', 'movement']" && inc_dconf &&
|
||||
#dconf write /org/gnome/desktop/break-reminders/selected-breaks \
|
||||
# "['movement']" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/selected-breaks \
|
||||
"@as []" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/duration-seconds \
|
||||
"uint32 180" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/interval-seconds \
|
||||
"uint32 1800" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/countdown \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/delay-seconds \
|
||||
"uint32 180" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/fade-screen \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/notify \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/notify-overdue \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/notify-upcoming \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/play-sound \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/interval-seconds \
|
||||
"uint32 1800" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/duration-seconds \
|
||||
"uint32 180" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/interval-seconds \
|
||||
"uint32 1800" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/countdown \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/delay-seconds \
|
||||
"uint32 60" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/fade-screen \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/notify \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/notify-overdue \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/notify-upcoming \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/play-sound \
|
||||
false && inc_dconf &&
|
||||
|
||||
## Success ##
|
||||
|
||||
sleep 0 ||
|
||||
|
||||
## Error Catch ##
|
||||
|
||||
echo "ERROR: DConf setting# $dconf_count failed!"
|
||||
|
||||
## Cleanup ##
|
||||
|
||||
unset -f inc_dconf
|
||||
unset dconf_count
|
||||
|
||||
fi # End Disable Cinnamon Settings
|
||||
marker: '# {mark} MANAGED BY ANSIBLE | Cinnamon Settings'
|
||||
state: present
|
||||
create: yes
|
||||
backup: yes
|
||||
become_user: "{{ user }}"
|
||||
loop:
|
||||
- .bashrc
|
||||
- .zshrc
|
||||
@@ -21,6 +21,7 @@
|
||||
, 'com.valvesoftware.Steam.desktop'
|
||||
, 'net.lutris.Lutris.desktop'
|
||||
, 'mullvad-vpn.desktop'
|
||||
, 'network.loki.Session.desktop'
|
||||
, 'org.signal.Signal.desktop', 'signal-desktop.desktop'
|
||||
, 'org.telegram.desktop.desktop'
|
||||
, 'com.discordapp.Discord.desktop'
|
||||
@@ -172,6 +173,7 @@
|
||||
# End block for Dash To Dock.
|
||||
|
||||
# Apply dconf settings through RC files due to distros without working psutil.
|
||||
# Use the command 'dconf watch /' then change settings to see find these values.
|
||||
- name: Workstation | Account Management | GNOME | Settings
|
||||
blockinfile:
|
||||
path: "{{ user_user.home }}/{{ item }}"
|
||||
@@ -185,52 +187,111 @@
|
||||
|
||||
## Dash to Dock ##
|
||||
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-position "'LEFT'" && inc_dconf &&
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-fixed true && inc_dconf &&
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/dash-max-icon-size 24 && inc_dconf &&
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-position \
|
||||
"'LEFT'" && inc_dconf &&
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-fixed \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/dash-max-icon-size \
|
||||
24 && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/shell/favorite-apps "{{ gnome_favorites }}" && inc_dconf &&
|
||||
dconf write /org/gnome/shell/favorite-apps \
|
||||
"{{ gnome_favorites }}" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/apply-custom-theme \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/custom-theme-shrink \
|
||||
true && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/dock-fixed \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/shell/extensions/dash-to-dock/intellihide-mode \
|
||||
"'ALL_WINDOWS'" && inc_dconf &&
|
||||
|
||||
## Generic ##
|
||||
|
||||
dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/gtk-theme "'{{ dconf_theme }}'" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/icon-theme "'{{ dconf_icons }}'" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/color-scheme \
|
||||
"'prefer-dark'" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/gtk-theme \
|
||||
"'{{ dconf_theme }}'" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/icon-theme \
|
||||
"'{{ dconf_icons }}'" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/interface/clock-show-date true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/clock-format "'24h'" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/clock-show-seconds true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/clock-show-weekday true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/calendar/show-weekdate true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/clock-show-date \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/clock-format \
|
||||
"'24h'" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/clock-show-seconds \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/clock-show-weekday \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/calendar/show-weekdate \
|
||||
true && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/interface/show-battery-percentage true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/show-battery-percentage \
|
||||
true && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/wm/preferences/button-layout "'appmenu:minimize,maximize,close'" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/wm/preferences/button-layout \
|
||||
"'appmenu:minimize,maximize,close'" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/wm/preferences/num-workspaces 1 && inc_dconf &&
|
||||
dconf write /org/gnome/mutter/dynamic-workspaces false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/wm/preferences/num-workspaces \
|
||||
1 && inc_dconf &&
|
||||
dconf write /org/gnome/mutter/dynamic-workspaces \
|
||||
false && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/mutter/edge-tiling true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/enable-hot-corners false && inc_dconf &&
|
||||
dconf write /org/gnome/mutter/edge-tiling \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/interface/enable-hot-corners \
|
||||
false && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/mutter/center-new-windows true && inc_dconf &&
|
||||
dconf write /org/gnome/mutter/center-new-windows \
|
||||
true && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/notifications/show-banners false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution-alarm-notify/enable-sound-alerts false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution-alarm-notify/enable false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution/enable-sound-alerts false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution/enable false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/notifications/show-banners \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution-alarm-notify/enable-sound-alerts \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution-alarm-notify/enable \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution/enable-sound-alerts \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/notifications/application/org-gnome-evolution/enable \
|
||||
false && inc_dconf &&
|
||||
|
||||
# Stop Update Notifications
|
||||
|
||||
dconf write /org/gnome/software/allow-updates \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/software/download-updates \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/software/download-updates-notify \
|
||||
false && inc_dconf &&
|
||||
|
||||
# Red Mode (Night Light)
|
||||
typeset -l redmode
|
||||
redmode="{{ redmode }}"
|
||||
if [[ $redmode == "true" ]]; then
|
||||
dconf write /org/gnome/settings-daemon/plugins/color/night-light-enabled true
|
||||
fi
|
||||
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-automatic false
|
||||
dconf write /org/gnome/settings-daemon/plugins/color/night-light-temperature "uint32 3170"
|
||||
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-from 2.0
|
||||
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-to 1.99
|
||||
(
|
||||
typeset -l redmode
|
||||
redmode="{{ redmode }}"
|
||||
if [[ $redmode == "true" ]]; then
|
||||
dconf write /org/gnome/settings-daemon/plugins/color/night-light-enabled \
|
||||
true && inc_dconf
|
||||
fi
|
||||
) &&
|
||||
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-automatic \
|
||||
false && inc_dconf &&
|
||||
#dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-from \
|
||||
# 2.0 && inc_dconf &&
|
||||
#dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-to \
|
||||
# 1.99 && inc_dconf &&
|
||||
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-from \
|
||||
19.00 && inc_dconf &&
|
||||
dconf write /org/gnome/settings-daemon/plugins/color/night-light-schedule-to \
|
||||
07.00 && inc_dconf &&
|
||||
|
||||
# 1700 is max through GNOME Settings, looks pretty red but can still see green vs blue.
|
||||
# 1200 is max on f.lux type apps, pretty difficult to see the difference between green and blue.
|
||||
# 0500 is the max on Red Moon, super intense on a laptop, not as much on a phone screen.
|
||||
# - Basically makes everything like the dash of a Z31 300ZX, lol.
|
||||
dconf write /org/gnome/settings-daemon/plugins/color/night-light-temperature \
|
||||
"uint32 1700" && inc_dconf &&
|
||||
|
||||
## Keyboard Shortcuts ##
|
||||
|
||||
@@ -255,24 +316,38 @@
|
||||
|
||||
## Privacy ##
|
||||
|
||||
dconf write /org/gnome/desktop/privacy/disable-camera true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/privacy/disable-microphone true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/privacy/disable-camera \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/privacy/disable-microphone \
|
||||
true && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/privacy/recent-files-max-age 7 && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/privacy/remember-recent-files false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/privacy/recent-files-max-age \
|
||||
7 && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/privacy/remember-recent-files \
|
||||
false && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/privacy/old-files-age "uint32 14" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/privacy/remove-old-trash-files true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/privacy/remove-old-temp-files true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/privacy/old-files-age \
|
||||
"uint32 14" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/privacy/remove-old-trash-files \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/privacy/remove-old-temp-files \
|
||||
true && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/notifications/show-in-lock-screen false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/screensaver/lock-enabled true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/screensaver/lock-delay "uint32 0" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/session/idle-delay "uint32 900" && inc_dconf &&
|
||||
dconf write /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type "'nothing'" && inc_dconf &&
|
||||
dconf write /org/gnome/settings-daemon/plugins/power/power-button-action "'nothing'" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/notifications/show-in-lock-screen \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/screensaver/lock-enabled \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/screensaver/lock-delay \
|
||||
"uint32 0" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/session/idle-delay \
|
||||
"uint32 900" && inc_dconf &&
|
||||
dconf write /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type \
|
||||
"'nothing'" && inc_dconf &&
|
||||
dconf write /org/gnome/settings-daemon/plugins/power/power-button-action \
|
||||
"'nothing'" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/media-handling/autorun-never true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/media-handling/autorun-never \
|
||||
true && inc_dconf &&
|
||||
|
||||
## Gnome Terminal ##
|
||||
|
||||
@@ -281,6 +356,66 @@
|
||||
#/org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/preserve-working-directory
|
||||
#'never'
|
||||
|
||||
## Wellbeing ##
|
||||
|
||||
dconf write /org/gnome/desktop/screen-time-limits/daily-limit-enabled \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/screen-time-limits/daily-limit-seconds \
|
||||
"uint32 33333" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/screen-time-limits/grayscale \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/screen-time-limits/history-enabled \
|
||||
true && inc_dconf &&
|
||||
|
||||
#dconf write /org/gnome/desktop/break-reminders/selected-breaks \
|
||||
# "['eyesight', 'movement']" && inc_dconf &&
|
||||
#dconf write /org/gnome/desktop/break-reminders/selected-breaks \
|
||||
# "['movement']" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/selected-breaks \
|
||||
"@as []" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/duration-seconds \
|
||||
"uint32 180" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/interval-seconds \
|
||||
"uint32 1800" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/countdown \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/delay-seconds \
|
||||
"uint32 180" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/fade-screen \
|
||||
true && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/notify \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/notify-overdue \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/notify-upcoming \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/play-sound \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/eyesight/interval-seconds \
|
||||
"uint32 1800" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/duration-seconds \
|
||||
"uint32 180" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/interval-seconds \
|
||||
"uint32 1800" && inc_dconf &&
|
||||
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/countdown \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/delay-seconds \
|
||||
"uint32 60" && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/fade-screen \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/notify \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/notify-overdue \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/notify-upcoming \
|
||||
false && inc_dconf &&
|
||||
dconf write /org/gnome/desktop/break-reminders/movement/play-sound \
|
||||
false && inc_dconf &&
|
||||
|
||||
## Success ##
|
||||
|
||||
sleep 0 ||
|
||||
@@ -293,7 +428,7 @@
|
||||
|
||||
unset -f inc_dconf
|
||||
unset dconf_count
|
||||
marker: '# {mark} MANAGED BY ANSIBLE | NixOS GNOME Settings'
|
||||
marker: '# {mark} MANAGED BY ANSIBLE | GNOME Settings'
|
||||
state: present
|
||||
create: yes
|
||||
backup: yes
|
||||
@@ -301,3 +436,18 @@
|
||||
loop:
|
||||
- .bashrc
|
||||
- .zshrc
|
||||
|
||||
# Remove the dconf settings which had the marker related to NixOS.
|
||||
- name: Workstation | Account Management | GNOME | Settings (NixOS)
|
||||
blockinfile:
|
||||
path: "{{ user_user.home }}/{{ item }}"
|
||||
block: |
|
||||
DELETEME
|
||||
marker: '# {mark} MANAGED BY ANSIBLE | NixOS GNOME Settings'
|
||||
state: present
|
||||
create: no
|
||||
backup: no
|
||||
become_user: "{{ user }}"
|
||||
loop:
|
||||
- .bashrc
|
||||
- .zshrc
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
# Copy everything from PROJECT/files/templates/ to User's home.
|
||||
|
||||
- name: Workstation | Settings | Templates | Variables
|
||||
set_fact:
|
||||
user_templates: "{{ user_user.home }}/Templates"
|
||||
|
||||
- name: Workstation | Settings | Templates | Ensure Directory Exists
|
||||
ansible.builtin.file:
|
||||
path: "{{ user_templates }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
owner: "{{ user }}"
|
||||
group: "{{ user }}"
|
||||
|
||||
- name: Workstation | Settings | Templates | Copy Files
|
||||
copy:
|
||||
src: 'templates/'
|
||||
dest: "{{ user_templates }}/"
|
||||
owner: "{{ user }}"
|
||||
group: "{{ user }}"
|
||||
mode: '0755'
|
||||
Reference in New Issue
Block a user