Compare commits

...

16 Commits

13 changed files with 509 additions and 515 deletions

6
.gitmodules vendored
View File

@@ -16,3 +16,9 @@
[submodule "pkgbuilds/terraform-ls-bin"] [submodule "pkgbuilds/terraform-ls-bin"]
path = pkgbuilds/terraform-ls-bin path = pkgbuilds/terraform-ls-bin
url = https://aur.archlinux.org/terraform-ls-bin.git url = https://aur.archlinux.org/terraform-ls-bin.git
[submodule "pkgbuilds/grm-git"]
path = pkgbuilds/grm-git
url = https://aur.archlinux.org/grm-git.git
[submodule "pkgbuilds/screencfg-git"]
path = pkgbuilds/screencfg-git
url = https://aur.archlinux.org/screencfg-git.git

View File

@@ -3,3 +3,4 @@ retry_files_enabled = False
nocows = 1 nocows = 1
roles_path = ./ansible_roles roles_path = ./ansible_roles
library = ./ansible_roles/firefox/library library = ./ansible_roles/firefox/library
remote_tmp = ${XDG_CONFIG_HOME}/ansible/tmp

View File

@@ -30,4 +30,4 @@ Wants=touchpad.service
Wants=xresources.service Wants=xresources.service
Wants=yubikey-touch-detector.service Wants=yubikey-touch-detector.service
Wants=kdeconnect.service Wants=kdeconnect.service
Wants=color-theme-dark.service

View File

@@ -71,6 +71,13 @@ command_on = "$HOME/.i3/scripts/presentation-mode toggle ; pkill -SIGRTMIN+0 i3s
command_off = "$HOME/.i3/scripts/presentation-mode toggle ; pkill -SIGRTMIN+0 i3status-rs" command_off = "$HOME/.i3/scripts/presentation-mode toggle ; pkill -SIGRTMIN+0 i3status-rs"
command_state = "[[ $($HOME/.i3/scripts/presentation-mode status) == on ]] && echo active" command_state = "[[ $($HOME/.i3/scripts/presentation-mode status) == on ]] && echo active"
[[block]]
block = "toggle"
format = "  $icon "
command_on = "systemctl --user start color-theme-light"
command_off = "systemctl --user start color-theme-dark"
command_state = "[[ $(systemctl --user is-active color-theme-light) == active ]] && echo active"
[[block]] [[block]]
block = "toggle" block = "toggle"
format = "  $icon " format = "  $icon "

View File

@@ -1,5 +1,3 @@
packages:
list:
kernel: kernel:
archlinux: archlinux:
- linux-zen - linux-zen
@@ -34,7 +32,7 @@ packages:
doas: doas:
archlinux: ["opendoas"] archlinux: ["opendoas"]
apt: apt:
archlinux: [""] archlinux: ["apt"]
xorg: xorg:
archlinux: archlinux:
- xorg-server - xorg-server
@@ -142,6 +140,9 @@ packages:
archlinux: archlinux:
- python - python
- python-lsp-server - python-lsp-server
- bandit
- python-pyflakes
- python-pylint
python-modules: python-modules:
archlinux: archlinux:
- python-ruamel-yaml - python-ruamel-yaml
@@ -448,23 +449,12 @@ packages:
watchexec: watchexec:
archlinux: archlinux:
- watchexec - watchexec
postgresql:
remove: archlinux:
mousepad: - postgresql
archlinux: ["mousepad"] tokei:
vim: archlinux:
archlinux: ["gvim"] - tokei
rust: whois:
archlinux: ["rust"] archlinux:
screen: - whois # also contains mkpasswd
archlinux: ["screen"]
lxc:
archlinux: ["lxc"]
autorandr:
archlinux: ["autorandr"]
openvpn:
archlinux: ["openvpn"]
bluetooth:
archlinux: ["bluez", "bluez-tools", "blueman"]
borgbackup:
archlinux: ["borg"]

1
pkgbuilds/grm-git Submodule

Submodule pkgbuilds/grm-git added at 4796cc6cd4

View File

@@ -158,53 +158,29 @@
- name: load package list - name: load package list
include_vars: include_vars:
file: packages.yml file: packages.yml
name: defined_packages
- name: force-update iptables to iptables-nft on arch
shell: pacman -Q iptables && yes | pacman -S iptables-nft
changed_when: false
become: true
- set_fact: - set_fact:
defined_packages: "{{ packages|json_query('keys(list)') }}" distro_packages: "{{ defined_packages|json_query('*.%s'|format(distro)) }}"
- set_fact:
distro_packages: "{{ packages|json_query('list.*.%s'|format(distro)) }}"
- name: check list - name: check list
assert: assert:
that: "defined_packages|length == distro_packages|length" that: "defined_packages|length == distro_packages|length"
- set_fact:
defined_packages_remove: "{{ packages|json_query('keys(remove)') }}"
- set_fact:
distro_packages_remove: "{{ packages|json_query('remove.*.%s'|format(distro)) }}"
- name: check list
assert:
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) }}"
- name: install packages - name: install packages
package: package:
name: "{{ packages|json_query(query) }}" name: "{{ defined_packages|json_query(query) }}"
state: present state: present
become: true become: true
vars: vars:
query: "{{ 'list.*.%s[]'|format(distro) }}" query: "{{ 'list.*.%s[]'|format(distro) }}"
- name: install machine-specific packages - name: remove unconfigured packages
package: script:
name: "{{ machine.packages }}" cmd: ./remove-unconfigured-packages.sh --noconfirm
state: present register: unconfigured_packages_cmd
when: machine.packages is defined failed_when: unconfigured_packages_cmd.rc not in (0, 123)
changed_when: unconfigured_packages_cmd.rc == 123
become: true become: true
- name: aur - name: aur
@@ -228,17 +204,17 @@
source ./env source ./env
curl -sSf --proto '=https' https://keys.openpgp.org/vks/v1/by-fingerprint/E46E6F8FF02E4C83569084589239277F560C95AC | gpg --import - curl -sSf --proto '=https' https://keys.openpgp.org/vks/v1/by-fingerprint/E46E6F8FF02E4C83569084589239277F560C95AC | gpg --import -
- name: nodejs-intelephense
- name: spotify - name: spotify
preexec: | preexec: |
#!/usr/bin/env bash #!/usr/bin/env bash
source ./env source ./env
curl -sSf --proto '=https' https://download.spotify.com/debian/pubkey_6224F9941A8AA6D1.gpg | gpg --import - curl -sSf --proto '=https' https://download.spotify.com/debian/pubkey_6224F9941A8AA6D1.gpg | gpg --import -
- name: nodejs-intelephense
- name: vim-plug - name: vim-plug
- name: terraform-ls-bin - name: terraform-ls-bin
- name: grm-git
- name: screencfg-git
- set_fact: - set_fact:
aur_packages: "{{ aur_packages|map(attribute='dependencies', default=[]) | flatten + aur_packages }}" aur_packages: "{{ aur_packages|map(attribute='dependencies', default=[]) | flatten + aur_packages }}"

View File

@@ -19,7 +19,7 @@ packages_to_remove=()
readarray -d $'\0' -t packages_to_remove < <(comm --zero-terminated -13 \ readarray -d $'\0' -t packages_to_remove < <(comm --zero-terminated -13 \
<(cat \ <(cat \
<(<packages.yml yaml2json | jq --raw-output0 '.packages.list | map(.archlinux) | flatten[]') \ <(<packages.yml yaml2json | jq --raw-output0 'map(.archlinux) | flatten[]') \
<(for dep in "${aurdeps[@]}" ; do printf '%s\0' "${dep}" ; done) \ <(for dep in "${aurdeps[@]}" ; do printf '%s\0' "${dep}" ; done) \
| sort -zu) \ | sort -zu) \
<(pacman -Qq --explicit | xargs -I "{}" printf '%s\0' "{}" | sort -zu) \ <(pacman -Qq --explicit | xargs -I "{}" printf '%s\0' "{}" | sort -zu) \
@@ -37,6 +37,7 @@ readarray -d $'\0' -t packages_to_remove < <(comm --zero-terminated -13 \
done) done)
if (( "${#packages_to_remove}" > 0 )) ; then if (( "${#packages_to_remove}" > 0 )) ; then
sudo pacman -Rcns "${packages_to_remove[@]}" sudo pacman -Rcns "${packages_to_remove[@]}" "${@}" || exit $?
exit 123
fi fi

View File

@@ -0,0 +1,9 @@
[Unit]
After=windowmanager.target
Conflicts=color-theme-light.service
[Service]
Type=oneshot
ExecStart=/usr/bin/env switch-color-mode dark
RemainAfterExit=true
PassEnvironment=DISPLAY

View File

@@ -1,9 +1,9 @@
[Unit] [Unit]
After=windowmanager.target After=windowmanager.target
Conflicts=color-theme-dark.service
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=/usr/bin/env switch-color-mode light ExecStart=/usr/bin/env switch-color-mode light
ExecStop=/usr/bin/env switch-color-mode dark
RemainAfterExit=true RemainAfterExit=true
PassEnvironment=DISPLAY PassEnvironment=DISPLAY

View File

@@ -17,6 +17,11 @@ export LANG=en_US.UTF-8
export LC_TIME=de_DE.UTF-8 export LC_TIME=de_DE.UTF-8
export LC_COLLATE=C export LC_COLLATE=C
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
@@ -33,11 +38,6 @@ export PATH="$PATH:$(go env GOPATH)/bin"
export QT_QPA_PLATFORMTHEME=qt5ct export QT_QPA_PLATFORMTHEME=qt5ct
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
export PASSWORD_STORE_DIR="$HOME/.password-store" export PASSWORD_STORE_DIR="$HOME/.password-store"
export GTK2_RC_FILES=${XDG_CONFIG_HOME}/gtkrc-2.0 export GTK2_RC_FILES=${XDG_CONFIG_HOME}/gtkrc-2.0

View File

@@ -387,6 +387,8 @@ tmp() {
if [[ -n ${remote} ]] ; then if [[ -n ${remote} ]] ; then
hook_com[branch]="%F{cyan}${hook_com[branch]}%F{$mainc}:%b%F{magenta}${remote}%F{yellow}${(j:/:)gitstatus}%F{$mainc}" hook_com[branch]="%F{cyan}${hook_com[branch]}%F{$mainc}:%b%F{magenta}${remote}%F{yellow}${(j:/:)gitstatus}%F{$mainc}"
else
hook_com[branch]="%F{cyan}${hook_com[branch]}%f"
fi fi
} }