Compare commits
224 Commits
35da0e349c
...
test2
| Author | SHA1 | Date | |
|---|---|---|---|
| f7d448f63b | |||
| 2a9a66fb06 | |||
| a29940a65a | |||
| d283bcddcd | |||
| efb3e54dcb | |||
| 872c9314e9 | |||
| 84c738ce64 | |||
| d814a13602 | |||
| 35b7ff0567 | |||
| ee10eb8779 | |||
| cc69e21613 | |||
| 0c6ffc6dbd | |||
| c21a76907c | |||
| 36dcdad8b7 | |||
| 3215c88ee1 | |||
| d2509eb0aa | |||
| d7305dc070 | |||
| 95a87d5112 | |||
| 9c11f4b357 | |||
| 05b7b53677 | |||
| 9170f6af1d | |||
| 14270d4217 | |||
| 214de1d2a2 | |||
| 8e22012b23 | |||
| bf44b943ac | |||
| fef4fd5ce1 | |||
| 2aa6073b5e | |||
| f722d06a28 | |||
| ec32037212 | |||
| 375935205e | |||
| 6b29f628db | |||
| 5890dd13d6 | |||
| 58dd4470fa | |||
| 680762b999 | |||
| 96ba4fd0b3 | |||
| b0b5833502 | |||
| 18c73ef8f1 | |||
| 9385652e8b | |||
| 5198256bf7 | |||
| 67ac6797df | |||
| 7703621506 | |||
| 0e125af3f7 | |||
| a9850d527c | |||
| cc6f4cb102 | |||
|
|
8d59331de5 | ||
|
|
066308e9ae | ||
|
|
6159d33cd6 | ||
| c70c39f28f | |||
| 468f1ee9c0 | |||
| bad23c0796 | |||
| d1b302a234 | |||
| 6fa75cad60 | |||
| f24e48d5cd | |||
| 579e97a3be | |||
| ba7153ce4a | |||
| 48d4788e55 | |||
| b9b12d07a3 | |||
| 4c998c4a21 | |||
| 7e119171dd | |||
| 2f339474e8 | |||
| 7d100dbbe5 | |||
| d03d13975f | |||
| cd0f9ab719 | |||
| c791055d7f | |||
| 9ac0a9895c | |||
| 7aea9806ad | |||
| a3e3c88204 | |||
| 5cbbf5e777 | |||
| 4b442be5ac | |||
| 87d8a43119 | |||
| 3f9dd1a39a | |||
| 91a3099822 | |||
| 78ec2715bd | |||
| cd937acc60 | |||
| c0b9631ecf | |||
| 06e2e847e9 | |||
| a14e884302 | |||
| d719481f4d | |||
| 3bb8f8bd56 | |||
| a71f9b7bc5 | |||
| 3cf49371e1 | |||
| 69f6ba29fc | |||
| 52525ba8ce | |||
| 19ca3f7980 | |||
| cf12e48c41 | |||
| b2b80a7ba4 | |||
| 903f6975fc | |||
|
|
284387581e | ||
| 1e05fe61f0 | |||
| 9f4cebde56 | |||
| 296f3e9f76 | |||
| bd7c4d270d | |||
| 617f63ed17 | |||
| 5ba2bda934 | |||
| 73c18fa7b7 | |||
| 546c08a28e | |||
| 40f08b3783 | |||
| 90fd75b2ba | |||
| 442e6e0986 | |||
| be07205cbb | |||
| 0c1ddd96c3 | |||
| abd7b450c9 | |||
| 7b92000dde | |||
| 7f5e51651a | |||
| f9cbe9fbea | |||
| ab75df4095 | |||
| 2668f4ffad | |||
| 1e706c8ed9 | |||
| 4f0f775a5d | |||
| c737c3a0f4 | |||
| fd3c106b29 | |||
| 1405b0621d | |||
| 75af2aba0f | |||
| 65455aff68 | |||
| da77ab91c7 | |||
| 03fbae33e4 | |||
| f844c3cc48 | |||
| f88cbf2a32 | |||
| adb32321a3 | |||
| 18b32adfc9 | |||
| 8f850ec2c8 | |||
| 73fe37e50f | |||
| 5e8820da53 | |||
| 7e0a937516 | |||
| ea1b3ecc3d | |||
| b4f502e964 | |||
| f84ed5f28d | |||
| 89799c2ccd | |||
| c51a326278 | |||
| cedecc54b9 | |||
| 0b01fd236e | |||
| 6e518966e0 | |||
| e8f2888ead | |||
| d9bb925581 | |||
| eac0c05a56 | |||
| ea512bb92d | |||
| 06bdbb608c | |||
| d5c8aaa6d8 | |||
| 60667c81a2 | |||
| c194f06137 | |||
| f93ce57d11 | |||
| cc3dcb9979 | |||
| d0c39c4dc6 | |||
| 42b8685182 | |||
| e369cf1917 | |||
| 10dd7a588e | |||
| b733b560b8 | |||
| 55b494a045 | |||
| db7e251b94 | |||
| 76de35c9a0 | |||
| 73a26bb372 | |||
| 7eefa3c800 | |||
| 959dc9dd80 | |||
| 614e3434e8 | |||
| c9d1fa8b0f | |||
| fa756766e5 | |||
| 4f4a9b919f | |||
| d086928ecc | |||
| 6008fb53db | |||
| 3fceca6d87 | |||
| aea05be674 | |||
| b9a9097f95 | |||
| d9dd1e7acf | |||
| 2018e47525 | |||
| d946aa4b4c | |||
| 408595d7e1 | |||
| b924e780c3 | |||
| e3158e02e4 | |||
| a706259322 | |||
| 20f7fe43d2 | |||
| b678d929ff | |||
| 9e5d3c5262 | |||
| cad6720173 | |||
| 0866a310cc | |||
|
|
a35d7d78e1 | ||
| 2128028113 | |||
| cc6a0673b9 | |||
| c859f7f76c | |||
| 1907fb2547 | |||
| 7b20ee2875 | |||
| 513e401099 | |||
| 1b22fe6116 | |||
| c6a056b77c | |||
| 236954d557 | |||
| f1c9e4a6f3 | |||
| c12185af79 | |||
| 57d3c570c0 | |||
| 8d3a4ff778 | |||
| ffb295d858 | |||
| fb3c3d8c19 | |||
| 41abaf2533 | |||
| b83ced88a5 | |||
| 9723753b5b | |||
| d2d2ddace4 | |||
|
|
eb31b393e9 | ||
| d74d7866ff | |||
| 75fdf52586 | |||
|
|
bdb0fd00bd | ||
|
|
2ae40edccc | ||
| 825ff4e770 | |||
| 2b9d974659 | |||
| 2895c33fbc | |||
| 5c3cf1b887 | |||
| a0968ba34a | |||
| 71a0886d46 | |||
|
|
83c9d72afe | ||
|
|
39b45df38e | ||
|
|
55477c5919 | ||
|
|
fd2a274668 | ||
|
|
613f249f64 | ||
|
|
9ac25a152d | ||
|
|
735568adfa | ||
|
|
5a803a578b | ||
|
|
818ac7ef8c | ||
|
|
c22d769ab5 | ||
|
|
96765dbf76 | ||
|
|
6f2e7d20b4 | ||
|
|
b742d63193 | ||
|
|
d78ba65063 | ||
|
|
7231b614fa | ||
|
|
f174a4e558 | ||
|
|
8c18407688 | ||
|
|
a396c0c739 | ||
|
|
d6ecdeb796 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1 @@
|
|||||||
/*.bundle
|
/venv/
|
||||||
|
|||||||
37
Makefile
37
Makefile
@@ -1,16 +1,17 @@
|
|||||||
ansible_run = ansible-playbook -e ansible_python_interpreter=/usr/bin/python3 --inventory localhost, --diff ./playbook.yml ${ANSIBLE_EXTRA_ARGS}
|
venv = ./venv
|
||||||
|
requirements = requirements.txt
|
||||||
|
activate = . $(venv)/bin/activate
|
||||||
|
pip = pip
|
||||||
|
ansible = venv/bin/ansible-playbook
|
||||||
|
ansible_run = $(activate) && ansible-playbook -e ansible_python_interpreter=/usr/bin/python3 --inventory localhost, --diff --verbose ./playbook.yml ${ANSIBLE_EXTRA_ARGS}
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all:
|
all: | venv $(ansible)
|
||||||
$(ansible_run)
|
$(ansible_run)
|
||||||
|
|
||||||
.PHONY: config
|
.PHONY: update
|
||||||
config:
|
update: $(ansible)
|
||||||
$(ansible_run) --skip-tags system-update
|
$(ansible_run) --tags update
|
||||||
|
|
||||||
.PHONY: system-update
|
|
||||||
system-update:
|
|
||||||
$(ansible_run) --tags system-update
|
|
||||||
|
|
||||||
.PHONY: reboot
|
.PHONY: reboot
|
||||||
reboot:
|
reboot:
|
||||||
@@ -24,13 +25,27 @@ poweroff:
|
|||||||
weekend: | update poweroff
|
weekend: | update poweroff
|
||||||
|
|
||||||
.PHONY: packages
|
.PHONY: packages
|
||||||
packages:
|
packages: $(ansible)
|
||||||
$(ansible_run) --tags packages
|
$(ansible_run) --tags packages
|
||||||
|
|
||||||
.PHONY: dotfiles
|
.PHONY: dotfiles
|
||||||
dotfiles:
|
dotfiles: $(ansible)
|
||||||
$(ansible_run) --tags dotfiles
|
$(ansible_run) --tags dotfiles
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -rf venv
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
./test-in-docker.sh
|
./test-in-docker.sh
|
||||||
|
|
||||||
|
$(ansible): venv
|
||||||
|
|
||||||
|
venv:
|
||||||
|
python3 -m venv $(venv)
|
||||||
|
$(activate) && $(pip) install -r $(requirements)
|
||||||
|
|
||||||
|
.PHONY: freeze
|
||||||
|
freeze:
|
||||||
|
$(activate) && $(pip) freeze > $(requirements)
|
||||||
|
|||||||
@@ -15,15 +15,6 @@ users:
|
|||||||
- i-dont-care-about-cookies
|
- i-dont-care-about-cookies
|
||||||
- floccus
|
- floccus
|
||||||
manage_css: true
|
manage_css: true
|
||||||
media:
|
|
||||||
extensions:
|
|
||||||
- ublock-origin
|
|
||||||
- passff
|
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
|
||||||
- i-dont-care-about-cookies
|
|
||||||
manage_css: true
|
|
||||||
bigger_font: true
|
|
||||||
mail: hannes@hkoerber.de
|
mail: hannes@hkoerber.de
|
||||||
git_gpg_sign: false
|
git_gpg_sign: false
|
||||||
gpg_agent: true
|
gpg_agent: true
|
||||||
|
|||||||
@@ -27,10 +27,6 @@ users:
|
|||||||
MACHINE_HAS_KEEPASSX: "true"
|
MACHINE_HAS_KEEPASSX: "true"
|
||||||
has_yubikey: false
|
has_yubikey: false
|
||||||
repositories: []
|
repositories: []
|
||||||
overrides:
|
|
||||||
terraform_version: 1.1.3
|
|
||||||
terraform_check_updates: false
|
|
||||||
|
|
||||||
- name: hannes-private
|
- name: hannes-private
|
||||||
group: hannes-private
|
group: hannes-private
|
||||||
vt: 2
|
vt: 2
|
||||||
@@ -63,12 +59,12 @@ users:
|
|||||||
- personal_projects
|
- personal_projects
|
||||||
|
|
||||||
screen:
|
screen:
|
||||||
1: DP-3
|
1: DP-1-1
|
||||||
2: DP-3
|
2: DP-1-1
|
||||||
3: DP-4
|
3: DP-1-2
|
||||||
4: DP-4
|
4: DP-1-2
|
||||||
5: DP-4
|
5: DP-1-2
|
||||||
6: DP-4
|
6: DP-1-2
|
||||||
7: eDP-1
|
7: eDP-1
|
||||||
8: eDP-1
|
8: eDP-1
|
||||||
9: eDP-1
|
9: eDP-1
|
||||||
|
|||||||
@@ -6,15 +6,8 @@ Wants=blueman.service
|
|||||||
Wants=dpms.service
|
Wants=dpms.service
|
||||||
Wants=dunst.service
|
Wants=dunst.service
|
||||||
Wants=element.service
|
Wants=element.service
|
||||||
{% for profile, config in (user.firefox_profiles|default({})).items() %}
|
{% for profile in (user.firefox_profiles|default({})).keys() %}
|
||||||
{% if config.bigger_font|default(false) is sameas false %}
|
|
||||||
Wants=firefox@{{ profile }}.service
|
Wants=firefox@{{ profile }}.service
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% for profile, config in (user.firefox_profiles|default({})).items() %}
|
|
||||||
{% if config.bigger_font|default(false) is sameas true %}
|
|
||||||
Wants=firefox-gtk-override-bigger-font@{{ profile }}.service
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
Wants=gpg-agent.service
|
Wants=gpg-agent.service
|
||||||
Wants=gnome-keyring.service
|
Wants=gnome-keyring.service
|
||||||
@@ -32,5 +25,4 @@ Wants=steam.service
|
|||||||
Wants=touchpad.service
|
Wants=touchpad.service
|
||||||
Wants=xresources.service
|
Wants=xresources.service
|
||||||
Wants=yubikey-touch-detector.service
|
Wants=yubikey-touch-detector.service
|
||||||
Wants=kdeconnect.service
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
BindsTo=autostart.target
|
|
||||||
After=windowmanager.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/bin/env firefox --setDefaultBrowser -P %i
|
|
||||||
PassEnvironment=DISPLAY
|
|
||||||
Environment=XDG_CONFIG_HOME=%h/.config/gtk-3.0-overrides/bigger-font/
|
|
||||||
Restart=always
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
BindsTo=autostart.target
|
|
||||||
After=windowmanager.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/bin/env kdeconnect-indicator
|
|
||||||
PassEnvironment=DISPLAY
|
|
||||||
Restart=always
|
|
||||||
@@ -3,6 +3,6 @@ ConditionPathExists=%h/.var/run/features/restic_backup
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=%h/restic/restic-backup
|
ExecStart=%h/bin/restic-backup
|
||||||
RemainAfterExit=true
|
RemainAfterExit=true
|
||||||
PassEnvironment=DISPLAY
|
PassEnvironment=DISPLAY
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
BindsTo=autostart.target
|
BindsTo=autostart.target
|
||||||
PartOf=gpg-agent.service
|
|
||||||
After=windowmanager.target
|
After=windowmanager.target
|
||||||
After=gpg-agent.service
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/env yubikey-touch-detector -libnotify
|
ExecStart=/usr/bin/env yubikey-touch-detector -libnotify
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
cd ~/code/personal/time-tracking/
|
cd ~/projects/personal/time-tracking/
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
source ~/.attendance_env
|
source ~/.attendance_env
|
||||||
|
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ log() {
|
|||||||
printf '[%s] %s\n' "$(date -uIseconds)" "$*" >> "$_logfile"
|
printf '[%s] %s\n' "$(date -uIseconds)" "$*" >> "$_logfile"
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1 $2" in
|
case "$1" in
|
||||||
"set-paused false")
|
enable)
|
||||||
log "Enabling dunst"
|
log "Enabling dunst"
|
||||||
systemctl --user --no-block kill --signal SIGUSR2 dunst
|
systemctl --user --no-block kill --signal SIGUSR2 dunst
|
||||||
|
|
||||||
;;
|
;;
|
||||||
"set-paused true")
|
disable)
|
||||||
log "Disabling dunst"
|
log "Disabling dunst"
|
||||||
systemctl --user --no-block kill --signal SIGUSR1 dunst
|
systemctl --user --no-block kill --signal SIGUSR1 dunst
|
||||||
;;
|
;;
|
||||||
|
|||||||
40
bin/nato
40
bin/nato
@@ -1,7 +1,6 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os.path
|
|
||||||
|
|
||||||
hash = {
|
hash = {
|
||||||
'A': 'Alpha',
|
'A': 'Alpha',
|
||||||
@@ -44,45 +43,6 @@ hash = {
|
|||||||
'.': 'Stop',
|
'.': 'Stop',
|
||||||
}
|
}
|
||||||
|
|
||||||
de = {
|
|
||||||
'A': 'Anton',
|
|
||||||
'Ä': 'Ärger',
|
|
||||||
'B': 'Berta',
|
|
||||||
'C': 'Cäsar',
|
|
||||||
'D': 'Dora',
|
|
||||||
'E': 'Emil',
|
|
||||||
'F': 'Friedrich',
|
|
||||||
'G': 'Gustav',
|
|
||||||
'H': 'Heinrich',
|
|
||||||
'I': 'Ida',
|
|
||||||
'J': 'Julius',
|
|
||||||
'K': 'Kaufmann',
|
|
||||||
'L': 'Ludwig',
|
|
||||||
'M': 'Martha',
|
|
||||||
'N': 'Nordpol',
|
|
||||||
'O': 'Otto',
|
|
||||||
'Ö': 'Ökonom',
|
|
||||||
'P': 'Paula',
|
|
||||||
'Q': 'Quelle',
|
|
||||||
'R': 'Richard',
|
|
||||||
'S': 'Samuel',
|
|
||||||
'ß': 'Eszett',
|
|
||||||
'T': 'Theodor',
|
|
||||||
'U': 'Ulrich',
|
|
||||||
'Ü': 'Übermut',
|
|
||||||
'V': 'Viktor',
|
|
||||||
'W': 'Wilhelm',
|
|
||||||
'X': 'Xanthippe',
|
|
||||||
'Y': 'Ypsilon',
|
|
||||||
'Z': 'Zacharias',
|
|
||||||
'-': 'Strich',
|
|
||||||
'.': 'Punkt',
|
|
||||||
}
|
|
||||||
|
|
||||||
if os.path.basename(sys.argv[0]) == 'natode':
|
|
||||||
hash = de
|
|
||||||
|
|
||||||
|
|
||||||
if len(sys.argv) < 2 or sys.argv[1] == '-':
|
if len(sys.argv) < 2 or sys.argv[1] == '-':
|
||||||
text = [line.strip() for line in sys.stdin.readlines()]
|
text = [line.strip() for line in sys.stdin.readlines()]
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
nato
|
|
||||||
14
bin/pf
14
bin/pf
@@ -1,14 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import json
|
|
||||||
import yaml
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
jqexpression = sys.argv[1]
|
|
||||||
|
|
||||||
jqprocess = subprocess.Popen(["jq", "-r", jqexpression], stdin=subprocess.PIPE, text=True)
|
|
||||||
|
|
||||||
document = [d for d in yaml.safe_load_all(sys.stdin)][-1]
|
|
||||||
|
|
||||||
json.dump(document, jqprocess.stdin)
|
|
||||||
@@ -5,9 +5,6 @@ empty_directories:
|
|||||||
- name: .config/nvim
|
- name: .config/nvim
|
||||||
- name: .config/rofi
|
- name: .config/rofi
|
||||||
- name: .config/gtk-3.0
|
- name: .config/gtk-3.0
|
||||||
- name: .config/gtk-3.0-overrides
|
|
||||||
- name: .config/gtk-3.0-overrides/bigger-font/
|
|
||||||
- name: .config/gtk-3.0-overrides/bigger-font/gtk-3.0
|
|
||||||
- name: .config/qt5ct
|
- name: .config/qt5ct
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- from: git/gitconfig
|
- from: git/gitconfig
|
||||||
@@ -65,9 +62,6 @@ dotfiles:
|
|||||||
- from: gtk/gtk-3.0.ini
|
- from: gtk/gtk-3.0.ini
|
||||||
to: .config/gtk-3.0/settings.ini
|
to: .config/gtk-3.0/settings.ini
|
||||||
template: true
|
template: true
|
||||||
- from: gtk/gtk-3.0-bigger-font.ini
|
|
||||||
to: .config/gtk-3.0-overrides/bigger-font/gtk-3.0/settings.ini
|
|
||||||
template: true
|
|
||||||
- from: gtk/gtkrc-2.0
|
- from: gtk/gtkrc-2.0
|
||||||
to: .gtkrc-2.0
|
to: .gtkrc-2.0
|
||||||
template: true
|
template: true
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
frame_width = 2
|
frame_width = 2
|
||||||
|
|
||||||
# Defines color of the frame around the notification window.
|
# Defines color of the frame around the notification window.
|
||||||
frame_color = "#ff964f"
|
frame_color = "#e16b40"
|
||||||
|
|
||||||
# Define a color for the separator.
|
# Define a color for the separator.
|
||||||
# possible values are:
|
# possible values are:
|
||||||
|
|||||||
@@ -120,5 +120,3 @@
|
|||||||
|
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = master
|
defaultBranch = master
|
||||||
[safe]
|
|
||||||
directory = /var/lib/dotfiles
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ name = "misc/rbackupd"
|
|||||||
|
|
||||||
[[trees.repos.remotes]]
|
[[trees.repos.remotes]]
|
||||||
name = "github"
|
name = "github"
|
||||||
url = "ssh://git@github.com/hakoerber/rbackupd.git"
|
url = "git@github.com:hakoerber/rbackupd.git"
|
||||||
type = "ssh"
|
type = "ssh"
|
||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
@@ -59,7 +59,7 @@ name = "misc/wifiqr"
|
|||||||
|
|
||||||
[[trees.repos.remotes]]
|
[[trees.repos.remotes]]
|
||||||
name = "github"
|
name = "github"
|
||||||
url = "ssh://git@github.com/hakoerber/wifiqr.git"
|
url = "ssh://git@github.com/hakoerber/wifi-qr.git"
|
||||||
type = "ssh"
|
type = "ssh"
|
||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
@@ -74,7 +74,7 @@ type = "ssh"
|
|||||||
name = "misc/xftwidth"
|
name = "misc/xftwidth"
|
||||||
|
|
||||||
[[trees.repos.remotes]]
|
[[trees.repos.remotes]]
|
||||||
name = "github"
|
name = "origin"
|
||||||
url = "ssh://git@github.com/hakoerber/xftwidth.git"
|
url = "ssh://git@github.com/hakoerber/xftwidth.git"
|
||||||
type = "ssh"
|
type = "ssh"
|
||||||
|
|
||||||
@@ -83,6 +83,10 @@ name = "upstream"
|
|||||||
url = "https://github.com/vixus0/xftwidth"
|
url = "https://github.com/vixus0/xftwidth"
|
||||||
type = "https"
|
type = "https"
|
||||||
|
|
||||||
|
[[trees.repos]]
|
||||||
|
name = "x-hidecursor"
|
||||||
|
remotes = []
|
||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
name = "git-repo-manager"
|
name = "git-repo-manager"
|
||||||
|
|
||||||
@@ -120,6 +124,11 @@ name = "github"
|
|||||||
url = "ssh://git@github.com/hakoerber/acimaker.git"
|
url = "ssh://git@github.com/hakoerber/acimaker.git"
|
||||||
type = "ssh"
|
type = "ssh"
|
||||||
|
|
||||||
|
[[trees.repos.remotes]]
|
||||||
|
name = "private"
|
||||||
|
url = "git@code.sys.haktec.de:container/acimaker.git"
|
||||||
|
type = "ssh"
|
||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
name = "container/drone-kaniko"
|
name = "container/drone-kaniko"
|
||||||
|
|
||||||
@@ -195,11 +204,7 @@ type = "ssh"
|
|||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
name = "lea-michael-hochzeit"
|
name = "lea-michael-hochzeit"
|
||||||
|
remotes = []
|
||||||
[[trees.repos.remotes]]
|
|
||||||
name = "origin"
|
|
||||||
url = "ssh://git@code.hkoerber.de:2222/hannes/lea-michi-hochzeit.git"
|
|
||||||
type = "ssh"
|
|
||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
name = "builddoc"
|
name = "builddoc"
|
||||||
@@ -231,11 +236,11 @@ url = "ssh://git@github.com/hakoerber/fizzbuzz.git"
|
|||||||
type = "ssh"
|
type = "ssh"
|
||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
name = "ggj/2018-the-lost-son"
|
name = "ggj/2018/the-lost-son"
|
||||||
|
|
||||||
[[trees.repos.remotes]]
|
[[trees.repos.remotes]]
|
||||||
name = "origin"
|
name = "origin"
|
||||||
url = "ssh://git@github.com/niklas-heer/the-lost-son.git"
|
url = "ssh://git@github.com:niklas-heer/the-lost-son.git"
|
||||||
type = "ssh"
|
type = "ssh"
|
||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
@@ -243,7 +248,7 @@ name = "ggj/2019-claim-your-world"
|
|||||||
|
|
||||||
[[trees.repos.remotes]]
|
[[trees.repos.remotes]]
|
||||||
name = "origin"
|
name = "origin"
|
||||||
url = "ssh://git@github.com/theintroverts/claim-your-world.git"
|
url = "ssh://git@github.com:theintroverts/claim-your-world.git"
|
||||||
type = "ssh"
|
type = "ssh"
|
||||||
|
|
||||||
[[trees.repos]]
|
[[trees.repos]]
|
||||||
@@ -308,18 +313,5 @@ type = "ssh"
|
|||||||
|
|
||||||
[[trees.repos.remotes]]
|
[[trees.repos.remotes]]
|
||||||
name = "origin"
|
name = "origin"
|
||||||
url = "ssh://git@code.hkoerber.de:2222/hannes/aws-glacier-backup.git"
|
url = "ssh://git@code.hkoerber.de:2222/hakoerber/aws-glacier-backup.git"
|
||||||
type = "ssh"
|
type = "ssh"
|
||||||
|
|
||||||
[[trees.repos]]
|
|
||||||
name = "unclutter-xfixes"
|
|
||||||
|
|
||||||
[[trees.repos.remotes]]
|
|
||||||
name = "github"
|
|
||||||
url = "git@github.com:hakoerber/unclutter-xfixes.git"
|
|
||||||
type = "ssh"
|
|
||||||
|
|
||||||
[[trees.repos.remotes]]
|
|
||||||
name = "upstream"
|
|
||||||
url = "https://github.com/Airblader/unclutter-xfixes"
|
|
||||||
type = "https"
|
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
[Settings]
|
|
||||||
gtk-theme-name=Breeze
|
|
||||||
gtk-icon-theme-name=breeze-dark
|
|
||||||
gtk-font-name=DejaVu Sans {{ ((machine.font_size|int - 2)|float * 2.0) | round(0, 'floor') | int }}
|
|
||||||
gtk-cursor-theme-name=breeze_cursors
|
|
||||||
gtk-cursor-theme-size=0
|
|
||||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
|
||||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
|
||||||
gtk-button-images=1
|
|
||||||
gtk-menu-images=1
|
|
||||||
gtk-enable-event-sounds=1
|
|
||||||
gtk-enable-input-feedback-sounds=1
|
|
||||||
gtk-xft-antialias=1
|
|
||||||
gtk-xft-hinting=1
|
|
||||||
gtk-xft-hintstyle=hintfull
|
|
||||||
16
i3/config.j2
16
i3/config.j2
@@ -319,10 +319,10 @@ assign [class="^Wine$"] $workspace10
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# class border backgr. text indicator
|
# class border backgr. text indicator
|
||||||
client.focused #e5b567 #e5b567 #000000 #FF0000
|
client.focused #E16B40 #E16B40 #000000 #FF0000
|
||||||
client.focused_inactive #272822 #5f676a #ffffff #484e50
|
client.focused_inactive #333333 #5f676a #ffffff #484e50
|
||||||
client.unfocused #1C1C1C #272822 #cccccc #292d2e
|
client.unfocused #333333 #202020 #cccccc #292d2e
|
||||||
client.urgent #272822 #900000 #ffffff #900000
|
client.urgent #2f343a #900000 #ffffff #900000
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
### APPLICATION SPECIFIC SETTINGS ##############################################
|
### APPLICATION SPECIFIC SETTINGS ##############################################
|
||||||
@@ -380,17 +380,17 @@ bar {
|
|||||||
colors {
|
colors {
|
||||||
background #272822
|
background #272822
|
||||||
statusline #ffffff
|
statusline #ffffff
|
||||||
separator #555555
|
separator #444444
|
||||||
# separator #e5b567
|
# separator #e16b40
|
||||||
|
|
||||||
# focused_background #303030
|
# focused_background #303030
|
||||||
# focused_separator #272822
|
# focused_separator #272822
|
||||||
|
|
||||||
focused_workspace #e5b567 #272822 #ffffff
|
focused_workspace #e16b40 #272822 #ffffff
|
||||||
active_workspace #272822 #5f676a #ffffff
|
active_workspace #272822 #5f676a #ffffff
|
||||||
inactive_workspace #272822 #272822 #dddddd
|
inactive_workspace #272822 #272822 #dddddd
|
||||||
urgent_workspace #D00000 #D00000 #272822
|
urgent_workspace #D00000 #D00000 #272822
|
||||||
binding_mode #272822 #e5b567 #272822
|
binding_mode #272822 #e16b40 #272822
|
||||||
}
|
}
|
||||||
|
|
||||||
i3bar_command i3bar
|
i3bar_command i3bar
|
||||||
|
|||||||
@@ -52,11 +52,10 @@ reset_screen() {
|
|||||||
lock_and_screen_off() {
|
lock_and_screen_off() {
|
||||||
lock &
|
lock &
|
||||||
_pid=$!
|
_pid=$!
|
||||||
dunst_paused=$(dunstctl is-paused)
|
dunstctl disable
|
||||||
[[ "${dunst_paused}" != "true" ]] && dunstctl set-paused true
|
|
||||||
screen_off
|
screen_off
|
||||||
wait $_pid
|
wait $_pid
|
||||||
[[ "${dunst_paused}" != "true" ]] && dunstctl set-paused false
|
dunstctl enable
|
||||||
reset_screen
|
reset_screen
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ is_on() {
|
|||||||
|
|
||||||
switch_on() {
|
switch_on() {
|
||||||
touch "${_status_file}"
|
touch "${_status_file}"
|
||||||
dunstctl set-paused true &
|
dunstctl disable &
|
||||||
systemctl --user --no-block stop redshift.service
|
systemctl --user --no-block stop redshift.service
|
||||||
systemctl --user --no-block stop spotify.service
|
systemctl --user --no-block stop spotify.service
|
||||||
~/.i3/scripts/bar-update "external_script presentation_mode"
|
~/.i3/scripts/bar-update "external_script presentation_mode"
|
||||||
@@ -19,7 +19,7 @@ switch_on() {
|
|||||||
|
|
||||||
switch_off() {
|
switch_off() {
|
||||||
rm -f "${_status_file}"
|
rm -f "${_status_file}"
|
||||||
dunstctl set-paused false &
|
dunstctl enable &
|
||||||
systemctl --user --no-block start redshift.service
|
systemctl --user --no-block start redshift.service
|
||||||
systemctl --user --no-block start spotify.service
|
systemctl --user --no-block start spotify.service
|
||||||
~/.i3/scripts/bar-update "external_script presentation_mode"
|
~/.i3/scripts/bar-update "external_script presentation_mode"
|
||||||
|
|||||||
15
install.sh
15
install.sh
@@ -68,6 +68,7 @@ _install() {
|
|||||||
if ! command -v python3 >/dev/null ; then
|
if ! command -v python3 >/dev/null ; then
|
||||||
printf 'Python3 not installed, installing ...\n'
|
printf 'Python3 not installed, installing ...\n'
|
||||||
_install "python3"
|
_install "python3"
|
||||||
|
_install "python3-venv"
|
||||||
printf 'Done\n'
|
printf 'Done\n'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -77,13 +78,17 @@ if ! command -v make >/dev/null ; then
|
|||||||
printf 'Done\n'
|
printf 'Done\n'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $NAME == "Arch Linux" ]] ; then
|
# Required for compiling modules in venv.
|
||||||
_install "ansible"
|
if ! command -v gcc >/dev/null ; then
|
||||||
|
printf 'gcc not installed, installing ...\n'
|
||||||
|
_install "gcc"
|
||||||
|
printf 'Done\n'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $NAME == "Ubuntu" ]] ; then
|
if ! python3 -c 'import venv' 2>/dev/null ; then
|
||||||
_install "ansible"
|
printf 'Python3 venv module not installed, installing ...\n'
|
||||||
_install "python3-jmespath"
|
_install python3-venv
|
||||||
|
printf 'Done\n'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$DOTDIR" && make
|
cd "$DOTDIR" && make
|
||||||
|
|||||||
14
packages.yml
14
packages.yml
@@ -183,9 +183,6 @@ packages:
|
|||||||
- python-ruamel-yaml
|
- python-ruamel-yaml
|
||||||
- python-gitpython
|
- python-gitpython
|
||||||
- python-semver
|
- python-semver
|
||||||
black:
|
|
||||||
ubuntu: ["black"]
|
|
||||||
archlinux: ["python-black"]
|
|
||||||
xbacklight:
|
xbacklight:
|
||||||
ubuntu: ["xbacklight"]
|
ubuntu: ["xbacklight"]
|
||||||
archlinux: ["xorg-xbacklight"]
|
archlinux: ["xorg-xbacklight"]
|
||||||
@@ -380,16 +377,7 @@ packages:
|
|||||||
archlinux: ["ncdu"]
|
archlinux: ["ncdu"]
|
||||||
font-utils:
|
font-utils:
|
||||||
ubuntu: ["woff-tools", "woff2"]
|
ubuntu: ["woff-tools", "woff2"]
|
||||||
archlinux: ["woff2"]
|
archinux: ["woff2"]
|
||||||
jq:
|
|
||||||
ubuntu: ["jq"]
|
|
||||||
archlinux: ["jq"]
|
|
||||||
musl:
|
|
||||||
ubuntu: ["musl", "musl-tools"]
|
|
||||||
archlinux: ["musl"]
|
|
||||||
kdeconnect:
|
|
||||||
ubuntu: ["kdeconnect"]
|
|
||||||
archlinux: ["kdeconnect"]
|
|
||||||
|
|
||||||
remove:
|
remove:
|
||||||
mousepad:
|
mousepad:
|
||||||
|
|||||||
219
playbook.yml
219
playbook.yml
@@ -49,19 +49,6 @@
|
|||||||
become: true
|
become: true
|
||||||
when: distro == 'ubuntu'
|
when: distro == 'ubuntu'
|
||||||
|
|
||||||
- block:
|
|
||||||
- name: install ansible requirements
|
|
||||||
package:
|
|
||||||
name: "{{ packages[distro] }}"
|
|
||||||
state: present
|
|
||||||
become: true
|
|
||||||
vars:
|
|
||||||
packages:
|
|
||||||
archlinux:
|
|
||||||
- python-jmespath
|
|
||||||
ubuntu:
|
|
||||||
- python3-jmespath
|
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: enable multilib repository
|
- name: enable multilib repository
|
||||||
blockinfile:
|
blockinfile:
|
||||||
@@ -100,7 +87,7 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
when: distro == 'archlinux'
|
when: distro == 'archlinux'
|
||||||
tags: [system-update]
|
tags: [update]
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: install sudo
|
- name: install sudo
|
||||||
@@ -114,6 +101,9 @@
|
|||||||
name:
|
name:
|
||||||
- base-devel
|
- base-devel
|
||||||
- git
|
- git
|
||||||
|
- cargo
|
||||||
|
- asp
|
||||||
|
- bat
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: create build user on arch
|
- name: create build user on arch
|
||||||
@@ -148,7 +138,7 @@
|
|||||||
shell: |
|
shell: |
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
if pacman -Qi paru-bin >/dev/null 2>&1; then
|
if pacman -Qi paru >/dev/null 2>&1; then
|
||||||
exit 100
|
exit 100
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
@@ -166,9 +156,9 @@
|
|||||||
mkdir -p /tmp/paru-build
|
mkdir -p /tmp/paru-build
|
||||||
cd /tmp/paru-build
|
cd /tmp/paru-build
|
||||||
|
|
||||||
curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/paru-bin.tar.gz
|
curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/paru.tar.gz
|
||||||
tar xvf paru-bin.tar.gz
|
tar xvf paru.tar.gz
|
||||||
cd paru-bin
|
cd paru
|
||||||
makepkg
|
makepkg
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
@@ -180,7 +170,7 @@
|
|||||||
shell: |
|
shell: |
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
pacman --noconfirm -U /tmp/paru-build/paru-bin/paru-bin-*.pkg.tar.zst
|
pacman --noconfirm -U /tmp/paru-build/paru/paru-*.pkg.tar.zst
|
||||||
rm -rf /tmp/paru-build
|
rm -rf /tmp/paru-build
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
@@ -196,7 +186,7 @@
|
|||||||
file: packages.yml
|
file: packages.yml
|
||||||
|
|
||||||
- name: force-update iptables to iptables-nft on arch
|
- name: force-update iptables to iptables-nft on arch
|
||||||
shell: pacman -Q iptables && yes | pacman -S iptables-nft
|
shell: pacman -Q iptables-nft || yes | pacman -S iptables-nft
|
||||||
changed_when: false
|
changed_when: false
|
||||||
become: true
|
become: true
|
||||||
when: distro == 'archlinux'
|
when: distro == 'archlinux'
|
||||||
@@ -221,15 +211,6 @@
|
|||||||
assert:
|
assert:
|
||||||
that: "defined_packages_remove|length == distro_packages_remove|length"
|
that: "defined_packages_remove|length == distro_packages_remove|length"
|
||||||
|
|
||||||
- name: remove packages
|
|
||||||
package:
|
|
||||||
name: "{{ packages|json_query(query) }}"
|
|
||||||
state: absent
|
|
||||||
become: true
|
|
||||||
vars:
|
|
||||||
query: "{{ 'remove.*.%s[]'|format(distro) }}"
|
|
||||||
when: distro != 'ubuntu'
|
|
||||||
|
|
||||||
- name: install packages
|
- name: install packages
|
||||||
package:
|
package:
|
||||||
name: "{{ packages|json_query(query) }}"
|
name: "{{ packages|json_query(query) }}"
|
||||||
@@ -239,14 +220,12 @@
|
|||||||
query: "{{ 'list.*.%s[]'|format(distro) }}"
|
query: "{{ 'list.*.%s[]'|format(distro) }}"
|
||||||
|
|
||||||
- name: remove packages
|
- name: remove packages
|
||||||
apt:
|
package:
|
||||||
name: "{{ packages|json_query(query) }}"
|
name: "{{ packages|json_query(query) }}"
|
||||||
state: absent
|
state: absent
|
||||||
purge: true
|
|
||||||
become: true
|
become: true
|
||||||
vars:
|
vars:
|
||||||
query: "{{ 'remove.*.%s[]'|format(distro) }}"
|
query: "{{ 'remove.*.%s[]'|format(distro) }}"
|
||||||
when: distro == 'ubuntu'
|
|
||||||
|
|
||||||
- name: install machine-specific packages
|
- name: install machine-specific packages
|
||||||
package:
|
package:
|
||||||
@@ -421,18 +400,8 @@
|
|||||||
system: true
|
system: true
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- set_fact:
|
|
||||||
cargo_env: . ~/.cargo/env
|
|
||||||
when: distro == 'ubuntu'
|
|
||||||
|
|
||||||
- set_fact:
|
|
||||||
# Do NOT just use `"true"`. Due to some YAML fuckery, it will be
|
|
||||||
# capitalized and the commands will fail.
|
|
||||||
cargo_env: "/bin/true"
|
|
||||||
when: distro == 'archlinux'
|
|
||||||
|
|
||||||
- name: install rustup on ubuntu
|
- name: install rustup on ubuntu
|
||||||
shell: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal
|
shell: curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||||
args:
|
args:
|
||||||
creates: /var/lib/rust_build/.cargo/bin/rustup
|
creates: /var/lib/rust_build/.cargo/bin/rustup
|
||||||
become: true
|
become: true
|
||||||
@@ -440,62 +409,38 @@
|
|||||||
when: distro == 'ubuntu'
|
when: distro == 'ubuntu'
|
||||||
|
|
||||||
- name: add rustup stable toolchain
|
- name: add rustup stable toolchain
|
||||||
shell: "{{ cargo_env }} && rustup toolchain install stable && rustup default stable"
|
shell: . ~/.cargo/env && rustup toolchain install stable && rustup default stable
|
||||||
|
become: true
|
||||||
|
become_user: rust_build
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: update rustup stable toolchain
|
||||||
|
shell: . ~/.cargo/env && rustup update stable
|
||||||
become: true
|
become: true
|
||||||
become_user: rust_build
|
become_user: rust_build
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: add rustup nightly toolchain
|
- name: add rustup nightly toolchain
|
||||||
shell: "{{ cargo_env }} && rustup toolchain install nightly"
|
shell: . ~/.cargo/env && rustup toolchain install nightly
|
||||||
become: true
|
become: true
|
||||||
become_user: rust_build
|
become_user: rust_build
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: add rustup additional toolchains
|
- name: update rustup nightly toolchain
|
||||||
shell: "{{ cargo_env }} && rustup toolchain install {{ item }}"
|
shell: . ~/.cargo/env && rustup update nightly
|
||||||
become: true
|
become: true
|
||||||
become_user: rust_build
|
become_user: rust_build
|
||||||
changed_when: false
|
changed_when: false
|
||||||
loop: "{{ cargo_crate_list|selectattr('toolchain', 'defined')|map(attribute='toolchain')|reject('in', ['none', 'stable', 'nightly'])|list }}"
|
|
||||||
|
|
||||||
- name: add additional targets
|
|
||||||
shell: "{{ cargo_env }} && rustup +{{ item.toolchain|default('stable') }} target add {{ item.target }}"
|
|
||||||
become: true
|
|
||||||
become_user: rust_build
|
|
||||||
changed_when: false
|
|
||||||
when:
|
|
||||||
- '"target" in item'
|
|
||||||
loop: "{{ cargo_crate_list }}"
|
|
||||||
|
|
||||||
- name: assert that nofeatures is not actually a flag
|
|
||||||
assert:
|
|
||||||
that: '"nofeatures" not in item.features|default([])'
|
|
||||||
msg: Wow, "nofeatures" is actually a feature. Update the playbook!
|
|
||||||
loop: "{{ cargo_crate_list }}"
|
|
||||||
|
|
||||||
- name: assert that only proper sources are defined
|
|
||||||
assert:
|
|
||||||
that: item.source|default("crates.io") in ("crates.io", "git")
|
|
||||||
msg: "Invalid source: {{ item.source|default('x') }}"
|
|
||||||
loop: "{{ cargo_crate_list }}"
|
|
||||||
|
|
||||||
- name: install required packages
|
|
||||||
package:
|
|
||||||
state: present
|
|
||||||
name: "{{ item.required_packages|map(attribute=distro)|list }}"
|
|
||||||
when: item.required_packages is defined
|
|
||||||
become: true
|
|
||||||
loop: "{{ cargo_crate_list }}"
|
|
||||||
|
|
||||||
- name: build rust crates from crates.io
|
- name: build rust crates from crates.io
|
||||||
shell: |
|
shell: |
|
||||||
set -o errexit
|
set -o errexit
|
||||||
{{ cargo_env }}
|
. ~/.cargo/env
|
||||||
|
|
||||||
rustup run {{ item.toolchain|default('stable') }} cargo install --features "{{ item.features|default([])|join(' ') }}" {{ "--target " ~ item.target if item.target is defined else '' }} --version {{ item.version }} {{ item.crate }}
|
rustup run {{ item.toolchain|default('stable') }} cargo install --version {{ item.version }} {{ item.crate }}
|
||||||
mv /var/lib/rust_build/.cargo/bin/{{ item.binary }} /var/lib/rust_build/.cargo/bin/{{ binary_id_cratesio }}
|
mv /var/lib/rust_build/.cargo/bin/{{ item.binary }} /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }}
|
||||||
args:
|
args:
|
||||||
creates: /var/lib/rust_build/.cargo/bin/{{ binary_id_cratesio }}
|
creates: /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }}
|
||||||
become: true # do not build as root!
|
become: true # do not build as root!
|
||||||
become_user: rust_build
|
become_user: rust_build
|
||||||
loop: "{{ cargo_crate_list }}"
|
loop: "{{ cargo_crate_list }}"
|
||||||
@@ -504,11 +449,10 @@
|
|||||||
- name: build rust crates from git
|
- name: build rust crates from git
|
||||||
shell: |
|
shell: |
|
||||||
set -o errexit
|
set -o errexit
|
||||||
{{ cargo_env }}
|
. ~/.cargo/env
|
||||||
rustup run {{ item.toolchain|default('stable') }} cargo install --features "{{ item.features|default([])|join(' ') }}" {{ "--target " ~ item.target if item.target is defined else '' }} --git {{ item.url }} --branch {{ item.branch }}
|
rustup run {{ item.toolchain|default('stable') }} cargo install --git {{ item.url }} --branch {{ item.branch }}
|
||||||
mv /var/lib/rust_build/.cargo/bin/{{ item.binary }} /var/lib/rust_build/.cargo/bin/{{ binary_id_git }}
|
|
||||||
args:
|
args:
|
||||||
creates: /var/lib/rust_build/.cargo/bin/{{ binary_id_git }}
|
creates: /var/lib/rust_build/.cargo/bin/{{ item.binary }}
|
||||||
become: true # do not build as root!
|
become: true # do not build as root!
|
||||||
become_user: rust_build
|
become_user: rust_build
|
||||||
loop: "{{ cargo_crate_list }}"
|
loop: "{{ cargo_crate_list }}"
|
||||||
@@ -525,27 +469,27 @@
|
|||||||
|
|
||||||
- name: move binaries for crates.io
|
- name: move binaries for crates.io
|
||||||
shell: |
|
shell: |
|
||||||
mv /var/lib/rust_build/.cargo/bin/{{ binary_id_cratesio }} /usr/local/lib/binaries/{{ binary_id_cratesio }}
|
mv /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }} /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }}
|
||||||
ln -s /usr/local/lib/binaries/{{ binary_id_cratesio }} /var/lib/rust_build/.cargo/bin/{{ binary_id_cratesio }}
|
ln -s /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }} /var/lib/rust_build/.cargo/bin/{{ item.binary }}.{{ item.version }}
|
||||||
args:
|
args:
|
||||||
creates: /usr/local/lib/binaries/{{ binary_id_cratesio }}
|
creates: /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }}
|
||||||
become: true
|
become: true
|
||||||
loop: "{{ cargo_crate_list }}"
|
loop: "{{ cargo_crate_list }}"
|
||||||
when: item.source|default('crates.io') == 'crates.io'
|
when: item.source|default('crates.io') == 'crates.io'
|
||||||
|
|
||||||
- name: move binaries for git
|
- name: move binaries for git
|
||||||
shell: |
|
shell: |
|
||||||
mv /var/lib/rust_build/.cargo/bin/{{ binary_id_git }} /usr/local/lib/binaries/{{ binary_id_git }}
|
mv /var/lib/rust_build/.cargo/bin/{{ item.binary }} /usr/local/lib/binaries/{{ item.binary }}
|
||||||
ln -s /usr/local/lib/binaries/{{ binary_id_git }} /var/lib/rust_build/.cargo/bin/{{ binary_id_git }}
|
ln -s /usr/local/lib/binaries/{{ item.binary }} /var/lib/rust_build/.cargo/bin/{{ item.binary }}
|
||||||
args:
|
args:
|
||||||
creates: /usr/local/lib/binaries/{{ binary_id_git }}
|
creates: /usr/local/lib/binaries/{{ item.binary }}
|
||||||
become: true
|
become: true
|
||||||
loop: "{{ cargo_crate_list }}"
|
loop: "{{ cargo_crate_list }}"
|
||||||
when: item.source|default('crates.io') == 'git'
|
when: item.source|default('crates.io') == 'git'
|
||||||
|
|
||||||
- name: link binaries for crates.io
|
- name: link binaries for crates.io
|
||||||
file:
|
file:
|
||||||
src: /usr/local/lib/binaries/{{ binary_id_cratesio }}
|
src: /usr/local/lib/binaries/{{ item.binary }}.{{ item.version }}
|
||||||
dest: /usr/local/bin/{{ item.binary }}
|
dest: /usr/local/bin/{{ item.binary }}
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
@@ -557,7 +501,7 @@
|
|||||||
|
|
||||||
- name: link binaries for git
|
- name: link binaries for git
|
||||||
file:
|
file:
|
||||||
src: /usr/local/lib/binaries/{{ binary_id_git }}
|
src: /usr/local/lib/binaries/{{ item.binary }}
|
||||||
dest: /usr/local/bin/{{ item.binary }}
|
dest: /usr/local/bin/{{ item.binary }}
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
@@ -566,57 +510,6 @@
|
|||||||
become: true
|
become: true
|
||||||
loop: "{{ cargo_crate_list }}"
|
loop: "{{ cargo_crate_list }}"
|
||||||
when: item.source|default('crates.io') == 'git'
|
when: item.source|default('crates.io') == 'git'
|
||||||
|
|
||||||
# Important: clean up the symlinks BEFORE the binaries they point to.
|
|
||||||
# Otherwise, ansible will skip them because `ansible.builtin.fileglob`
|
|
||||||
# does not match broken symlinks for some reason.
|
|
||||||
- name: clean up old binaries for creates.io in /var/lib/rust_build
|
|
||||||
command: rm -- {{ binaries | join (" ") }}
|
|
||||||
vars:
|
|
||||||
binaries: "{{ lookup('ansible.builtin.fileglob', '/var/lib/rust_build/.cargo/bin/' ~ item.binary ~ '.*', wantlist=True) | reject('eq', '/var/lib/rust_build/.cargo/bin/' ~ binary_id_cratesio) | list }}"
|
|
||||||
changed_when: binaries | length > 0
|
|
||||||
loop: "{{ cargo_crate_list }}"
|
|
||||||
become: true
|
|
||||||
when:
|
|
||||||
- item.source|default('crates.io') == 'crates.io'
|
|
||||||
- binaries | length > 0
|
|
||||||
|
|
||||||
- name: clean up old binaries for creates.io in /usr/local/lib
|
|
||||||
command: rm -- {{ binaries | join (" ") }}
|
|
||||||
vars:
|
|
||||||
binaries: "{{ lookup('ansible.builtin.fileglob', '/usr/local/lib/binaries/' ~ item.binary ~ '.*', wantlist=True) | reject('eq', '/usr/local/lib/binaries/' ~ binary_id_cratesio) | list }}"
|
|
||||||
changed_when: binaries | length > 0
|
|
||||||
loop: "{{ cargo_crate_list }}"
|
|
||||||
become: true
|
|
||||||
when:
|
|
||||||
- item.source|default('crates.io') == 'crates.io'
|
|
||||||
- binaries | length > 0
|
|
||||||
|
|
||||||
- name: clean up old binaries for git in /var/lib/rust_build
|
|
||||||
command: rm -- {{ binaries | join (" ") }}
|
|
||||||
vars:
|
|
||||||
binaries: "{{ lookup('ansible.builtin.fileglob', '/var/lib/rust_build/.cargo/bin/' ~ item.binary ~ '.*', wantlist=True) | reject('eq', '/var/lib/rust_build/.cargo/bin/' ~ binary_id_git) | list }}"
|
|
||||||
changed_when: binaries | length > 0
|
|
||||||
loop: "{{ cargo_crate_list }}"
|
|
||||||
become: true
|
|
||||||
when:
|
|
||||||
- item.source|default('crates.io') == 'git'
|
|
||||||
- binaries | length > 0
|
|
||||||
|
|
||||||
- name: clean up old binaries for git in /usr/local/lib
|
|
||||||
command: rm -- {{ binaries | join (" ") }}
|
|
||||||
vars:
|
|
||||||
binaries: "{{ lookup('ansible.builtin.fileglob', '/usr/local/lib/binaries/' ~ item.binary ~ '.*', wantlist=True) | reject('eq', '/usr/local/lib/binaries/' ~ binary_id_git) | list }}"
|
|
||||||
changed_when: binaries | length > 0
|
|
||||||
loop: "{{ cargo_crate_list }}"
|
|
||||||
become: true
|
|
||||||
when:
|
|
||||||
- item.source|default('crates.io') == 'git'
|
|
||||||
- binaries | length > 0
|
|
||||||
|
|
||||||
vars:
|
|
||||||
binary_id_cratesio: "{{ item.binary }}.{{ item.toolchain|default('stable') }}.{{ item.features|default(['nofeatures'])|join('_') }}.{{ item.version }}"
|
|
||||||
binary_id_git: "{{ item.binary }}.{{ item.toolchain|default('stable') }}.{{ item.features|default(['nofeatures'])|join('_') }}.{{ item.branch }}"
|
|
||||||
tags:
|
tags:
|
||||||
- rust_binaries
|
- rust_binaries
|
||||||
|
|
||||||
@@ -636,7 +529,6 @@
|
|||||||
get_url:
|
get_url:
|
||||||
url: https://golang.org/dl/go{{ go_version }}.linux-amd64.tar.gz
|
url: https://golang.org/dl/go{{ go_version }}.linux-amd64.tar.gz
|
||||||
dest: "{{ go_download.path }}/go{{ go_version }}.linux-amd64.tar.gz"
|
dest: "{{ go_download.path }}/go{{ go_version }}.linux-amd64.tar.gz"
|
||||||
force: false
|
|
||||||
|
|
||||||
- name: unpack go
|
- name: unpack go
|
||||||
unarchive:
|
unarchive:
|
||||||
@@ -673,7 +565,7 @@
|
|||||||
copy:
|
copy:
|
||||||
dest: /etc/profile.d/go.sh
|
dest: /etc/profile.d/go.sh
|
||||||
content: |
|
content: |
|
||||||
export PATH=/usr/local/go/bin:$PATH
|
export PATH=$PATH:/usr/local/go/bin
|
||||||
export GOROOT=/usr/local/go
|
export GOROOT=/usr/local/go
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
@@ -706,16 +598,12 @@
|
|||||||
tempfile:
|
tempfile:
|
||||||
state: directory
|
state: directory
|
||||||
register: alacritty_build_tempdir
|
register: alacritty_build_tempdir
|
||||||
become: true
|
|
||||||
become_user: rust_build
|
|
||||||
when: not alacritty_binary.stat.exists
|
when: not alacritty_binary.stat.exists
|
||||||
|
|
||||||
- name: build alacritty
|
- name: build alacritty
|
||||||
shell: . ~/.cargo/env && rustup run stable cargo install alacritty --root ./out
|
command: cargo install alacritty --root ./out
|
||||||
args:
|
args:
|
||||||
chdir: "{{ alacritty_build_tempdir.path }}"
|
chdir: "{{ alacritty_build_tempdir.path }}"
|
||||||
become: true
|
|
||||||
become_user: rust_build
|
|
||||||
when: not alacritty_binary.stat.exists
|
when: not alacritty_binary.stat.exists
|
||||||
|
|
||||||
- name: install alacritty
|
- name: install alacritty
|
||||||
@@ -727,8 +615,6 @@
|
|||||||
file:
|
file:
|
||||||
path: "{{ alacritty_build_tempdir.path }}"
|
path: "{{ alacritty_build_tempdir.path }}"
|
||||||
state: absent
|
state: absent
|
||||||
become: true
|
|
||||||
become_user: rust_build
|
|
||||||
when: not alacritty_binary.stat.exists
|
when: not alacritty_binary.stat.exists
|
||||||
|
|
||||||
when: distro == 'ubuntu'
|
when: distro == 'ubuntu'
|
||||||
@@ -747,7 +633,7 @@
|
|||||||
when: not yubikey_touch_detector_binary.stat.exists
|
when: not yubikey_touch_detector_binary.stat.exists
|
||||||
|
|
||||||
- name: build yubikey-touch-detector
|
- name: build yubikey-touch-detector
|
||||||
shell: sh -c 'PATH=/usr/local/go/bin:$PATH env GOROOT=/usr/local/go GOPATH=$(pwd) go install github.com/maximbaz/yubikey-touch-detector@main'
|
shell: sh -c 'PATH=/usr/local/go/bin:$PATH env GOROOT=/usr/local/go GOPATH=$(pwd) go get -u github.com/maximbaz/yubikey-touch-detector'
|
||||||
args:
|
args:
|
||||||
chdir: "{{ yubikey_touch_detector_build_tempdir.path }}"
|
chdir: "{{ yubikey_touch_detector_build_tempdir.path }}"
|
||||||
when: not yubikey_touch_detector_binary.stat.exists
|
when: not yubikey_touch_detector_binary.stat.exists
|
||||||
@@ -764,7 +650,6 @@
|
|||||||
file:
|
file:
|
||||||
path: "{{ yubikey_touch_detector_build_tempdir.path }}"
|
path: "{{ yubikey_touch_detector_build_tempdir.path }}"
|
||||||
state: absent
|
state: absent
|
||||||
become: true
|
|
||||||
when: not yubikey_touch_detector_binary.stat.exists
|
when: not yubikey_touch_detector_binary.stat.exists
|
||||||
|
|
||||||
when: distro == 'ubuntu'
|
when: distro == 'ubuntu'
|
||||||
@@ -774,8 +659,8 @@
|
|||||||
- block:
|
- block:
|
||||||
- name: add spotify apt key
|
- name: add spotify apt key
|
||||||
apt_key:
|
apt_key:
|
||||||
url: "https://download.spotify.com/debian/pubkey_5E3C45D7B312C643.gpg"
|
url: "https://download.spotify.com/debian/pubkey_0D811D58.gpg"
|
||||||
id: "5E3C45D7B312C643"
|
id: "D1742AD60D811D58"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: add spotify repository
|
- name: add spotify repository
|
||||||
@@ -794,7 +679,7 @@
|
|||||||
- block:
|
- block:
|
||||||
- name: install spotify from AUR via paru
|
- name: install spotify from AUR via paru
|
||||||
shell: |
|
shell: |
|
||||||
curl -sS https://download.spotify.com/debian/pubkey_5E3C45D7B312C643.gpg | gpg --import
|
curl -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | gpg --import
|
||||||
yes 1 | paru --skipreview --aur --batchinstall --noconfirm -S spotify
|
yes 1 | paru --skipreview --aur --batchinstall --noconfirm -S spotify
|
||||||
become: true
|
become: true
|
||||||
become_user: paru
|
become_user: paru
|
||||||
@@ -832,24 +717,6 @@
|
|||||||
become: true
|
become: true
|
||||||
become_user: root
|
become_user: root
|
||||||
|
|
||||||
- name: fix permissions for dotfiles directory
|
|
||||||
shell: |
|
|
||||||
# There is no sane way to specify the global .gitconfig to use, so we
|
|
||||||
# actually have to override HOME so git looks into ~/.gitconfig
|
|
||||||
export HOME="$(mktemp -d)"
|
|
||||||
set -o pipefail
|
|
||||||
set -o errexit
|
|
||||||
cd /var/lib/dotfiles
|
|
||||||
git config --global --add safe.directory /var/lib/dotfiles
|
|
||||||
git ls-tree -z --name-only HEAD | xargs --null chown --changes --recursive dotfiles:dotfiles
|
|
||||||
git ls-tree -z --name-only HEAD | xargs --null chmod --changes --recursive g+wX /var/lib/dotfiles
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
register: dotfiles_permission_change
|
|
||||||
become: true
|
|
||||||
become_user: root
|
|
||||||
changed_when: dotfiles_permission_change.stdout_lines|length > 0
|
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
users: "{{ machine.users }}"
|
users: "{{ machine.users }}"
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
12
requirements.txt
Normal file
12
requirements.txt
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
ansible==4.6.0
|
||||||
|
ansible-core==2.11.5
|
||||||
|
cffi==1.14.6
|
||||||
|
cryptography==35.0.0
|
||||||
|
Jinja2==3.0.1
|
||||||
|
jmespath==0.10.0
|
||||||
|
MarkupSafe==2.0.1
|
||||||
|
packaging==21.0
|
||||||
|
pycparser==2.20
|
||||||
|
pyparsing==2.4.7
|
||||||
|
PyYAML==5.4.1
|
||||||
|
resolvelib==0.5.4
|
||||||
@@ -6,13 +6,9 @@ outputs:
|
|||||||
mode: 1920x1080
|
mode: 1920x1080
|
||||||
scale: 1x1
|
scale: 1x1
|
||||||
pos: "0x0" # beware of hex
|
pos: "0x0" # beware of hex
|
||||||
- name: DP-1
|
- name: DP-1-1
|
||||||
disable: true
|
disable: true
|
||||||
- name: DP-2
|
- name: DP-1-2
|
||||||
disable: true
|
disable: true
|
||||||
- name: DP-3
|
- name: DP-1-3
|
||||||
disable: true
|
|
||||||
- name: DP-4
|
|
||||||
disable: true
|
|
||||||
- name: DP-5
|
|
||||||
disable: true
|
disable: true
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
reset: true
|
|
||||||
outputs:
|
|
||||||
- name: eDP-1
|
|
||||||
opts:
|
|
||||||
mode: 1920x1080
|
|
||||||
scale: 0.7x0.7
|
|
||||||
# x: 2*1920
|
|
||||||
# y: 1080-(0.7*1080)
|
|
||||||
pos: "3840x324" # beware of hex
|
|
||||||
- name: DP-4
|
|
||||||
opts:
|
|
||||||
mode: 1920x1080
|
|
||||||
pos: "1920x0" # beware of hex
|
|
||||||
reset: true
|
|
||||||
- name: DP-3
|
|
||||||
primary: True
|
|
||||||
opts:
|
|
||||||
mode: 1920x1080
|
|
||||||
left-of: DP-4
|
|
||||||
pos: "0x0" # beware of hex
|
|
||||||
reset: true
|
|
||||||
@@ -21,8 +21,6 @@ gzip -k -f -v "${tmpdir}/dotfiles.tar"
|
|||||||
test_ares() {
|
test_ares() {
|
||||||
if [[ -d "/var/cache/pacman/pkg/" ]] ; then
|
if [[ -d "/var/cache/pacman/pkg/" ]] ; then
|
||||||
dockeropts=(-v "/var/cache/pacman/pkg/:/var/cache/pacman/pkg_host/")
|
dockeropts=(-v "/var/cache/pacman/pkg/:/var/cache/pacman/pkg_host/")
|
||||||
else
|
|
||||||
echo "Warning: /var/cache/pacman/pkg/ does not exist. Create it to speed up multiple runs" >&2
|
|
||||||
fi
|
fi
|
||||||
docker pull docker.io/library/archlinux:base
|
docker pull docker.io/library/archlinux:base
|
||||||
docker run \
|
docker run \
|
||||||
@@ -40,10 +38,10 @@ test_ares() {
|
|||||||
# At worst, the cache directory will be ignored if it does not exist
|
# At worst, the cache directory will be ignored if it does not exist
|
||||||
# Pacman will always prefer the first cache directory, so newly downloaded
|
# Pacman will always prefer the first cache directory, so newly downloaded
|
||||||
# packages will stay in the container
|
# packages will stay in the container
|
||||||
sed -i '"'"'s/^#\?\(CacheDir.*\)/CacheDir = \/var\/cache\/pacman\/pkg_host\/\n\1/'"'"' /etc/pacman.conf
|
sed -i '"'"'s/^#\?\(CacheDir.*\)/\1\nCacheDir = \/var\/cache\/pacman\/pkg_host\//'"'"' /etc/pacman.conf
|
||||||
|
|
||||||
mkdir -p /var/cache/pacman/pkg_host/
|
pacman -Syu --noconfirm linux python3
|
||||||
pacman -Syu --noconfirm linux
|
mkdir /var/cache/pacman/pkg_host/
|
||||||
cd $(mktemp -d)
|
cd $(mktemp -d)
|
||||||
tar xf /tmp/dotfiles.tar.gz -C .
|
tar xf /tmp/dotfiles.tar.gz -C .
|
||||||
ANSIBLE_EXTRA_ARGS="-e manage_services=false" ./install.sh
|
ANSIBLE_EXTRA_ARGS="-e manage_services=false" ./install.sh
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
set -g default-command "${SHELL}"
|
set -g default-command "${SHELL}"
|
||||||
# This *has* to be set to something with `screen-`, do not set this bindly
|
set -g default-terminal "xterm-256color"
|
||||||
# to $TERM, e.g. "alacritty"!
|
|
||||||
set -g default-terminal "screen-256color"
|
|
||||||
|
|
||||||
set -g set-titles on
|
set -g set-titles on
|
||||||
set -g set-titles-string '#S'
|
set -g set-titles-string '#S'
|
||||||
@@ -40,36 +38,26 @@ set-window-option -g pane-base-index 1
|
|||||||
set -g status-position bottom
|
set -g status-position bottom
|
||||||
set -g status-justify left
|
set -g status-justify left
|
||||||
|
|
||||||
# https://wiki.archlinux.org/title/tmux#256_colors
|
|
||||||
set -ga terminal-overrides ",alacritty:Tc"
|
|
||||||
|
|
||||||
setw -g pane-border-status bottom
|
set-option -g status-bg '#272822'
|
||||||
setw -g pane-border-format ''
|
set-option -g status-fg white
|
||||||
|
|
||||||
setw -g pane-border-lines double
|
|
||||||
setw -g pane-border-style "fg=#555555"
|
|
||||||
setw -g pane-active-border-style "fg=#e5b567"
|
|
||||||
setw -g pane-border-indicators colour
|
|
||||||
|
|
||||||
set-option -g status-style bg=default
|
|
||||||
|
|
||||||
set-window-option -g window-status-format ' #I: #W #F '
|
set-window-option -g window-status-format ' #I: #W #F '
|
||||||
set-window-option -g window-status-current-format ' #I: #W #F '
|
set-window-option -g window-status-current-format ' #I: #W #F '
|
||||||
set-window-option -g window-status-current-style "bg=#e5b567,fg=black"
|
|
||||||
|
|
||||||
set-window-option -g monitor-activity on
|
set-window-option -g monitor-activity on
|
||||||
set-window-option -g visual-activity off
|
set -g visual-activity on
|
||||||
set-window-option -g window-status-activity-style "bg=#ff77777,fg=black"
|
|
||||||
|
|
||||||
set-window-option -g automatic-rename on
|
set-window-option -g automatic-rename on
|
||||||
set-window-option -g automatic-rename-format '#{pane_current_command}'
|
set-window-option -g automatic-rename-format '#{pane_current_command}'
|
||||||
|
|
||||||
set-window-option -g window-status-separator ' '
|
set-window-option -g window-status-separator ' '
|
||||||
|
|
||||||
set -g status-left " #[bg=#6c99bb,fg=#2e2e2e] #{session_name} #[bg=default] "
|
set -g status-left " #[bg=#A6E22E,fg=#000000] #{session_name} #[bg=#272822] "
|
||||||
set -g status-right "#[bg=#CCCCCC,fg=#555555] #{host} #[bg=default] "
|
set -g status-right "#[bg=#CCCCCC,fg=#555555] #{host} #[bg=#272822] "
|
||||||
set -g status-left-length 100
|
set -g status-left-length 100
|
||||||
|
|
||||||
|
set -g status-style "bg=#272822,fg=#FFFFFF"
|
||||||
set -g message-style "bg=#CCCCCC,fg=#555555"
|
set -g message-style "bg=#CCCCCC,fg=#555555"
|
||||||
|
|
||||||
# vertical = | in this case
|
# vertical = | in this case
|
||||||
|
|||||||
67
user.yml
67
user.yml
@@ -314,7 +314,7 @@
|
|||||||
register: ycm_before_update
|
register: ycm_before_update
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: ycm_before_update.rc not in (0, 200)
|
failed_when: ycm_before_update.rc not in (0, 200)
|
||||||
tags: [user-update]
|
tags: [update]
|
||||||
|
|
||||||
- name: install vim plugins
|
- name: install vim plugins
|
||||||
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugInstall +qall'
|
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugInstall +qall'
|
||||||
@@ -329,12 +329,12 @@
|
|||||||
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugUpdate +qall'
|
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugUpdate +qall'
|
||||||
register: vim_plugin_update
|
register: vim_plugin_update
|
||||||
changed_when: vim_plugin_update.stderr != ""
|
changed_when: vim_plugin_update.stderr != ""
|
||||||
tags: [user-update]
|
tags: [update]
|
||||||
|
|
||||||
- name: update go binaries for vim
|
- name: update go binaries for vim
|
||||||
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoUpdateBinaries +qall'
|
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoUpdateBinaries +qall'
|
||||||
changed_when: false
|
changed_when: false
|
||||||
tags: [user-update]
|
tags: [update]
|
||||||
|
|
||||||
- name: get ycm version after update
|
- name: get ycm version after update
|
||||||
shell: |
|
shell: |
|
||||||
@@ -344,12 +344,15 @@
|
|||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
register: ycm_after_update
|
register: ycm_after_update
|
||||||
changed_when: false
|
changed_when: false
|
||||||
tags: [user-update]
|
tags: [update]
|
||||||
|
|
||||||
- name: compile youcompleteme
|
- name: compile youcompleteme
|
||||||
|
# --force-sudo is required, as the script refuses to run in a sudo
|
||||||
|
# environment (i.e. if the SUDO_USER env variable is set). But of course,
|
||||||
|
# ansible uses that to assume the other user. It's fine.
|
||||||
shell: |
|
shell: |
|
||||||
cd ~/.local/share/nvim/plugged/YouCompleteMe
|
cd ~/.local/share/nvim/plugged/YouCompleteMe
|
||||||
python3 ./install.py
|
python3 ./install.py --force-sudo
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
register: ycm_compile_output
|
register: ycm_compile_output
|
||||||
@@ -358,7 +361,7 @@
|
|||||||
(ycm_before_update.rc == 200)
|
(ycm_before_update.rc == 200)
|
||||||
or
|
or
|
||||||
(ycm_before_update.stdout != ycm_after_update.stdout)
|
(ycm_before_update.stdout != ycm_after_update.stdout)
|
||||||
tags: [user-update]
|
tags: [update]
|
||||||
tags: [vim-plugins]
|
tags: [vim-plugins]
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
@@ -379,6 +382,7 @@
|
|||||||
- set_fact:
|
- set_fact:
|
||||||
firefox_preferences:
|
firefox_preferences:
|
||||||
browser.aboutConfig.showWarning: false
|
browser.aboutConfig.showWarning: false
|
||||||
|
browser.download.useDownloadDir: false
|
||||||
extensions.pocket.enabled: false
|
extensions.pocket.enabled: false
|
||||||
toolkit.legacyUserProfileCustomizations.stylesheets: true
|
toolkit.legacyUserProfileCustomizations.stylesheets: true
|
||||||
browser.contentblocking.category: "strict"
|
browser.contentblocking.category: "strict"
|
||||||
@@ -410,22 +414,6 @@
|
|||||||
# "Allow Firefox to install and run studies"
|
# "Allow Firefox to install and run studies"
|
||||||
app.shield.optoutstudies.enabled: false
|
app.shield.optoutstudies.enabled: false
|
||||||
|
|
||||||
# "Check spelling as you type"
|
|
||||||
layout.spellcheckDefault: 0
|
|
||||||
|
|
||||||
# Ask for download directory
|
|
||||||
browser.download.useDownloadDir: false
|
|
||||||
|
|
||||||
# (Try to) disable automatic update, as firefox is pulling a Windows
|
|
||||||
app.update.auto: false
|
|
||||||
app.update.service.enabled: false
|
|
||||||
|
|
||||||
# remove this camera / microphone overlay when in calls or similar
|
|
||||||
privacy.webrtc.legacyGlobalIndicator: false
|
|
||||||
|
|
||||||
# use distro updates instead
|
|
||||||
app.update.auto: false
|
|
||||||
|
|
||||||
- include_role:
|
- include_role:
|
||||||
name: firefox
|
name: firefox
|
||||||
vars:
|
vars:
|
||||||
@@ -440,14 +428,6 @@
|
|||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|
||||||
- name: check if host application file already exists
|
|
||||||
stat:
|
|
||||||
path: ~/.mozilla/native-messaging-hosts/{{ item.name }}
|
|
||||||
register: passff_file
|
|
||||||
loop:
|
|
||||||
- name: passff.json
|
|
||||||
- name: passff.py
|
|
||||||
|
|
||||||
- name: firefox - get passff host application
|
- name: firefox - get passff host application
|
||||||
get_url:
|
get_url:
|
||||||
url: https://github.com/passff/passff-host/releases/download/1.2.2/{{ item.name }}
|
url: https://github.com/passff/passff-host/releases/download/1.2.2/{{ item.name }}
|
||||||
@@ -455,8 +435,6 @@
|
|||||||
owner: "{{ user.name }}"
|
owner: "{{ user.name }}"
|
||||||
group: "{{ user_group_name }}"
|
group: "{{ user_group_name }}"
|
||||||
mode: "{{ item.mode }}"
|
mode: "{{ item.mode }}"
|
||||||
force: false
|
|
||||||
when: not (passff_file.results | selectattr('item.name', 'eq', item.name) | list)[0].stat.exists
|
|
||||||
loop:
|
loop:
|
||||||
- name: passff.json
|
- name: passff.json
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
@@ -466,10 +444,8 @@
|
|||||||
- name: firefox - configure path to passff
|
- name: firefox - configure path to passff
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: ~/.mozilla/native-messaging-hosts/passff.json
|
path: ~/.mozilla/native-messaging-hosts/passff.json
|
||||||
regexp: '"path": ".*"'
|
search_string: '"path": "PLACEHOLDER"'
|
||||||
line: " \"path\": \"{{ path }}\","
|
line: " \"path\": \"/home/{{ user.name }}/.mozilla/native-messaging-hosts/passff.py\","
|
||||||
vars:
|
|
||||||
path: "/home/{{ user.name }}/.mozilla/native-messaging-hosts/passff.py"
|
|
||||||
|
|
||||||
- name: firefox - create chrome directory
|
- name: firefox - create chrome directory
|
||||||
file:
|
file:
|
||||||
@@ -515,7 +491,6 @@
|
|||||||
get_url:
|
get_url:
|
||||||
url: https://github.com/buchen/portfolio/releases/download/{{ portfolio_performace_version }}/PortfolioPerformance-{{ portfolio_performace_version }}-linux.gtk.x86_64.tar.gz
|
url: https://github.com/buchen/portfolio/releases/download/{{ portfolio_performace_version }}/PortfolioPerformance-{{ portfolio_performace_version }}-linux.gtk.x86_64.tar.gz
|
||||||
dest: "{{ tempdir.path }}/PortfolioPerformance.{{ portfolio_performace_version }}.tar.gz"
|
dest: "{{ tempdir.path }}/PortfolioPerformance.{{ portfolio_performace_version }}.tar.gz"
|
||||||
force: false
|
|
||||||
|
|
||||||
- name: create destination directory
|
- name: create destination directory
|
||||||
file:
|
file:
|
||||||
@@ -588,7 +563,6 @@
|
|||||||
owner: "{{ user.name }}"
|
owner: "{{ user.name }}"
|
||||||
group: "{{ user_group_name }}"
|
group: "{{ user_group_name }}"
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
force: false
|
|
||||||
|
|
||||||
- name: make kubectl executable
|
- name: make kubectl executable
|
||||||
file:
|
file:
|
||||||
@@ -605,13 +579,9 @@
|
|||||||
- kubectl
|
- kubectl
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- set_fact:
|
|
||||||
tf_version: "{{ user.overrides.terraform_version|default(terraform_version) }}"
|
|
||||||
tf_check_updates: "{{ user.overrides.terraform_check_updates|default(terraform_check_updates)|default(true) }}"
|
|
||||||
|
|
||||||
- name: stat current terraform binary
|
- name: stat current terraform binary
|
||||||
stat:
|
stat:
|
||||||
path: "/home/{{ user.name }}/.opt/terraform-v{{ tf_version }}"
|
path: "/home/{{ user.name }}/.opt/terraform-v{{ terraform_version }}"
|
||||||
register: terraform_binary
|
register: terraform_binary
|
||||||
|
|
||||||
- name: create temporary download directory for terraform
|
- name: create temporary download directory for terraform
|
||||||
@@ -622,9 +592,8 @@
|
|||||||
|
|
||||||
- name: get terraform
|
- name: get terraform
|
||||||
get_url:
|
get_url:
|
||||||
url: "https://releases.hashicorp.com/terraform/{{ tf_version }}/terraform_{{ tf_version }}_linux_amd64.zip"
|
url: "https://releases.hashicorp.com/terraform/{{ terraform_version }}/terraform_{{ terraform_version }}_linux_amd64.zip"
|
||||||
dest: "{{ terraform_download_dir.path }}/terraform.zip"
|
dest: "{{ terraform_download_dir.path }}/terraform.zip"
|
||||||
force: false
|
|
||||||
when: not terraform_binary.stat.exists
|
when: not terraform_binary.stat.exists
|
||||||
|
|
||||||
- name: unpack terraform zip
|
- name: unpack terraform zip
|
||||||
@@ -635,7 +604,7 @@
|
|||||||
when: not terraform_binary.stat.exists
|
when: not terraform_binary.stat.exists
|
||||||
|
|
||||||
- name: install terraform
|
- name: install terraform
|
||||||
command: mv "{{ terraform_download_dir.path }}/terraform" /home/{{ user.name }}/.opt/terraform-v{{ tf_version }}
|
command: mv "{{ terraform_download_dir.path }}/terraform" /home/{{ user.name }}/.opt/terraform-v{{ terraform_version }}
|
||||||
when: not terraform_binary.stat.exists
|
when: not terraform_binary.stat.exists
|
||||||
|
|
||||||
- name: clean up download directory
|
- name: clean up download directory
|
||||||
@@ -646,11 +615,10 @@
|
|||||||
|
|
||||||
- name: link terraform
|
- name: link terraform
|
||||||
file:
|
file:
|
||||||
src: /home/{{ user.name }}/.opt/terraform-v{{ tf_version }}
|
src: /home/{{ user.name }}/.opt/terraform-v{{ terraform_version }}
|
||||||
dest: /home/{{ user.name }}/.optbin/terraform
|
dest: /home/{{ user.name }}/.optbin/terraform
|
||||||
state: link
|
state: link
|
||||||
|
|
||||||
- block:
|
|
||||||
- name: get terraform version info
|
- name: get terraform version info
|
||||||
command: /home/{{ user.name }}/.optbin/terraform version -json
|
command: /home/{{ user.name }}/.optbin/terraform version -json
|
||||||
register: terraform_version_output
|
register: terraform_version_output
|
||||||
@@ -664,10 +632,9 @@
|
|||||||
|
|
||||||
- name: warn if terraform is outdated
|
- name: warn if terraform is outdated
|
||||||
fail:
|
fail:
|
||||||
msg: "current terraform v{{ tf_version }} is out of date"
|
msg: "current terraform v{{ terraform_version }} is out of date"
|
||||||
when: terraform_outdated is sameas true
|
when: terraform_outdated is sameas true
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
when: tf_check_updates
|
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- terraform
|
- terraform
|
||||||
|
|||||||
@@ -1,42 +1,28 @@
|
|||||||
terraform_version: 1.2.4
|
terraform_version: 1.0.2
|
||||||
kubectl_version: v1.24.2
|
kubectl_version: v1.22.3
|
||||||
go_version: "1.18.3"
|
go_version: "1.17.1"
|
||||||
portfolio_performace_version: "0.57.2"
|
portfolio_performace_version: "0.55.0"
|
||||||
cargo_crate_list:
|
cargo_crate_list:
|
||||||
- crate: just
|
- crate: just
|
||||||
binary: just
|
binary: just
|
||||||
version: 1.2.0
|
version: 0.10.2
|
||||||
- crate: ripgrep
|
- crate: ripgrep
|
||||||
binary: rg
|
binary: rg
|
||||||
version: 13.0.0
|
version: 13.0.0
|
||||||
features:
|
|
||||||
- pcre2
|
|
||||||
- simd-accel
|
|
||||||
toolchain: nightly # necessary for SIMD
|
|
||||||
required_packages:
|
|
||||||
- ubuntu: libpcre2-dev
|
|
||||||
archlinux: pcre2
|
|
||||||
- crate: fd-find
|
- crate: fd-find
|
||||||
binary: fd
|
binary: fd
|
||||||
version: 8.4.0
|
version: 8.2.1
|
||||||
- crate: bat
|
- crate: bat
|
||||||
binary: bat
|
binary: bat
|
||||||
version: 0.21.0
|
version: 0.18.3
|
||||||
- crate: exa
|
- crate: exa
|
||||||
binary: exa
|
binary: exa
|
||||||
version: 0.10.1
|
version: 0.10.1
|
||||||
toolchain: "1.60" # Fails with 1.61, see https://github.com/rust-lang/rust/issues/97255
|
|
||||||
- crate: watchexec-cli
|
- crate: watchexec-cli
|
||||||
binary: watchexec
|
binary: watchexec
|
||||||
version: 1.20.2
|
version: 1.17.1
|
||||||
- crate: mdbook
|
|
||||||
binary: mdbook
|
|
||||||
version: 0.4.18
|
|
||||||
- url: https://github.com/hakoerber/git-repo-manager
|
- url: https://github.com/hakoerber/git-repo-manager
|
||||||
binary: grm
|
binary: grm
|
||||||
branch: develop
|
branch: master
|
||||||
source: git
|
source: git
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
features:
|
|
||||||
- static-build
|
|
||||||
target: x86_64-unknown-linux-musl
|
|
||||||
|
|||||||
69
vim/vimrc
69
vim/vimrc
@@ -13,8 +13,8 @@ Plug 'majutsushi/tagbar'
|
|||||||
" Plug 'nblock/vim-dokuwiki'
|
" Plug 'nblock/vim-dokuwiki'
|
||||||
Plug 'reedes/vim-pencil'
|
Plug 'reedes/vim-pencil'
|
||||||
Plug 'saltstack/salt-vim'
|
Plug 'saltstack/salt-vim'
|
||||||
Plug 'sickill/vim-monokai'
|
"Plug 'sickill/vim-monokai'
|
||||||
" Plug 'patstockwell/vim-monokai-tasty'
|
Plug 'patstockwell/vim-monokai-tasty'
|
||||||
" Plug 'sjl/gundo.vim'
|
" Plug 'sjl/gundo.vim'
|
||||||
Plug 'tpope/vim-commentary'
|
Plug 'tpope/vim-commentary'
|
||||||
Plug 'tpope/vim-fugitive'
|
Plug 'tpope/vim-fugitive'
|
||||||
@@ -47,7 +47,7 @@ Plug 'vimwiki/vimwiki'
|
|||||||
Plug 'rodjek/vim-puppet'
|
Plug 'rodjek/vim-puppet'
|
||||||
Plug 'suan/vim-instant-markdown'
|
Plug 'suan/vim-instant-markdown'
|
||||||
"Plug 'marshallward/vim-restructuredtext'
|
"Plug 'marshallward/vim-restructuredtext'
|
||||||
Plug 'vim-syntastic/syntastic'
|
"Plug 'vim-syntastic/syntastic'
|
||||||
"Plug 'ElmCast/elm-vim'
|
"Plug 'ElmCast/elm-vim'
|
||||||
"Plug 'avh4/elm-format'
|
"Plug 'avh4/elm-format'
|
||||||
|
|
||||||
@@ -73,19 +73,6 @@ Plug 'evanleck/vim-svelte', {'branch': 'main'}
|
|||||||
|
|
||||||
Plug 'cespare/vim-toml', { 'branch': 'main' }
|
Plug 'cespare/vim-toml', { 'branch': 'main' }
|
||||||
|
|
||||||
"Plug 'rust-lang/rust.vim'
|
|
||||||
|
|
||||||
" Plug 'autozimu/LanguageClient-neovim', {
|
|
||||||
" \ 'branch': 'next',
|
|
||||||
" \ 'do': 'bash install.sh',
|
|
||||||
" \ }
|
|
||||||
|
|
||||||
Plug 'neovim/nvim-lspconfig'
|
|
||||||
Plug 'simrat39/rust-tools.nvim'
|
|
||||||
|
|
||||||
"Plug 'dense-analysis/ale'
|
|
||||||
|
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
|
||||||
@@ -187,8 +174,6 @@ set linebreak
|
|||||||
set wrap
|
set wrap
|
||||||
set wrapscan
|
set wrapscan
|
||||||
|
|
||||||
" == to use guicolors in terminal ==
|
|
||||||
set termguicolors
|
|
||||||
|
|
||||||
" === keybinds ===
|
" === keybinds ===
|
||||||
set pastetoggle=<F11>
|
set pastetoggle=<F11>
|
||||||
@@ -259,7 +244,7 @@ nnoremap Q <nop>
|
|||||||
" let g:solarized_contrast="normal"
|
" let g:solarized_contrast="normal"
|
||||||
" let g:solarized_visibility="normal"
|
" let g:solarized_visibility="normal"
|
||||||
syntax enable
|
syntax enable
|
||||||
silent! colorscheme monokai
|
silent! colorscheme vim-monokai-tasty
|
||||||
|
|
||||||
" == tagbar ==
|
" == tagbar ==
|
||||||
nnoremap <F10> :TagbarToggle<CR>
|
nnoremap <F10> :TagbarToggle<CR>
|
||||||
@@ -289,7 +274,7 @@ let g:tagbar_foldlevel = 99 " unfold all
|
|||||||
"let g:airline#extensions#whitespace#checks = ['trailing']
|
"let g:airline#extensions#whitespace#checks = ['trailing']
|
||||||
|
|
||||||
let g:lightline = {
|
let g:lightline = {
|
||||||
\ 'colorscheme': 'wombat',
|
\ 'colorscheme': 'powerline',
|
||||||
\ 'active': {
|
\ 'active': {
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
\ 'left': [ [ 'mode', 'paste' ],
|
||||||
\ [ 'readonly', 'filename', 'modified', 'helloworld' ] ],
|
\ [ 'readonly', 'filename', 'modified', 'helloworld' ] ],
|
||||||
@@ -370,47 +355,3 @@ let g:go_info_mode='gopls'
|
|||||||
|
|
||||||
" https://stackoverflow.com/a/8585343
|
" https://stackoverflow.com/a/8585343
|
||||||
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>
|
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>
|
||||||
|
|
||||||
let g:rustfmt_autosave = 1
|
|
||||||
|
|
||||||
let g:LanguageClient_serverCommands = {
|
|
||||||
\ 'rust': ['rust-analyzer'],
|
|
||||||
\ }
|
|
||||||
|
|
||||||
" let g:ale_linters = {'rust': ['analyzer']}
|
|
||||||
|
|
||||||
lua <<EOF
|
|
||||||
local nvim_lsp = require'lspconfig'
|
|
||||||
|
|
||||||
local opts = {
|
|
||||||
tools = { -- rust-tools options
|
|
||||||
autoSetHints = true,
|
|
||||||
hover_with_actions = true,
|
|
||||||
inlay_hints = {
|
|
||||||
show_parameter_hints = false,
|
|
||||||
parameter_hints_prefix = "",
|
|
||||||
other_hints_prefix = "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- all the opts to send to nvim-lspconfig
|
|
||||||
-- these override the defaults set by rust-tools.nvim
|
|
||||||
-- see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#rust_analyzer
|
|
||||||
server = {
|
|
||||||
-- on_attach is a callback called when the language server attachs to the buffer
|
|
||||||
-- on_attach = on_attach,
|
|
||||||
settings = {
|
|
||||||
-- to enable rust-analyzer settings visit:
|
|
||||||
-- https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/generated_config.adoc
|
|
||||||
["rust-analyzer"] = {
|
|
||||||
-- enable clippy on save
|
|
||||||
checkOnSave = {
|
|
||||||
command = "clippy"
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
require('rust-tools').setup(opts)
|
|
||||||
EOF
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ _path=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
for part in ${_path[@]} ; do
|
for part in ${_path[@]} ; do
|
||||||
PATH="${part}:$PATH"
|
PATH="$PATH:${part}"
|
||||||
done
|
done
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ alias twa="task add"
|
|||||||
alias twd="task done"
|
alias twd="task done"
|
||||||
alias inbox="task add +inbox"
|
alias inbox="task add +inbox"
|
||||||
|
|
||||||
alias yaml2json="python3 -c 'import sys, yaml, json; json.dump([d for d in yaml.safe_load_all(sys.stdin)][-1], sys.stdout, indent=4)'"
|
alias yaml2json="python3 -c 'import sys, yaml, json; json.dump(yaml.safe_load(sys.stdin), sys.stdout, indent=4)'"
|
||||||
alias json2yaml="python3 -c 'import sys, yaml, json; yaml.safe_dump(json.loads(sys.stdin.read()), stream=sys.stdout)'"
|
alias json2yaml="python3 -c 'import sys, yaml, json; yaml.safe_dump(json.loads(sys.stdin.read()), stream=sys.stdout)'"
|
||||||
|
|
||||||
alias currentbranch='git rev-parse --abbrev-ref HEAD'
|
alias currentbranch='git rev-parse --abbrev-ref HEAD'
|
||||||
|
|||||||
Reference in New Issue
Block a user