Compare commits
11 Commits
cf12e48c41
...
cd937acc60
| Author | SHA1 | Date | |
|---|---|---|---|
| cd937acc60 | |||
| c0b9631ecf | |||
| 06e2e847e9 | |||
| a14e884302 | |||
| d719481f4d | |||
| 3bb8f8bd56 | |||
| a71f9b7bc5 | |||
| 3cf49371e1 | |||
| 69f6ba29fc | |||
| 52525ba8ce | |||
| 19ca3f7980 |
@@ -389,6 +389,9 @@ packages:
|
|||||||
ncdu:
|
ncdu:
|
||||||
ubuntu: ["ncdu"]
|
ubuntu: ["ncdu"]
|
||||||
archlinux: ["ncdu"]
|
archlinux: ["ncdu"]
|
||||||
|
signal:
|
||||||
|
ubuntu: []
|
||||||
|
archlinux: ["signal-desktop"]
|
||||||
|
|
||||||
remove:
|
remove:
|
||||||
mousepad:
|
mousepad:
|
||||||
|
|||||||
68
playbook.yml
68
playbook.yml
@@ -98,6 +98,24 @@
|
|||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
system: true
|
system: true
|
||||||
|
|
||||||
|
- name: create paru user on arch
|
||||||
|
user:
|
||||||
|
name: paru
|
||||||
|
home: /var/lib/paru
|
||||||
|
create_home: true
|
||||||
|
shell: /bin/bash
|
||||||
|
system: true
|
||||||
|
|
||||||
|
- name: configure passwordless sudo for paru user
|
||||||
|
copy:
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0600"
|
||||||
|
dest: /etc/sudoers.d/paru
|
||||||
|
content: |
|
||||||
|
paru ALL=(ALL) NOPASSWD: /usr/bin/pacman
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: check if paru is already installed
|
- name: check if paru is already installed
|
||||||
shell: |
|
shell: |
|
||||||
set -o errexit
|
set -o errexit
|
||||||
@@ -435,24 +453,37 @@
|
|||||||
tags: [yubikey-touch-detector]
|
tags: [yubikey-touch-detector]
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: add spotify apt key
|
- block:
|
||||||
apt_key:
|
- name: add spotify apt key
|
||||||
url: "https://download.spotify.com/debian/pubkey_0D811D58.gpg"
|
apt_key:
|
||||||
id: "D1742AD60D811D58"
|
url: "https://download.spotify.com/debian/pubkey_0D811D58.gpg"
|
||||||
become: true
|
id: "D1742AD60D811D58"
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: add spotify repository
|
- name: add spotify repository
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: "deb http://repository.spotify.com stable non-free"
|
repo: "deb http://repository.spotify.com stable non-free"
|
||||||
filename: spotify
|
filename: spotify
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: install spotify
|
||||||
|
apt:
|
||||||
|
name: spotify-client
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
||||||
|
when: distro == 'ubuntu'
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- name: install spotify from AUR via paru
|
||||||
|
shell: |
|
||||||
|
curl -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | gpg --import
|
||||||
|
yes 1 | paru --skipreview --aur --batchinstall --noconfirm -S spotify
|
||||||
|
become: true
|
||||||
|
become_user: paru
|
||||||
|
args:
|
||||||
|
creates: /usr/bin/spotify
|
||||||
|
when: distro == 'archlinux'
|
||||||
|
|
||||||
- name: install spotify
|
|
||||||
apt:
|
|
||||||
name: spotify-client
|
|
||||||
update_cache: true
|
|
||||||
become: true
|
|
||||||
when: distro == 'ubuntu'
|
|
||||||
tags: [spotify]
|
tags: [spotify]
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
@@ -523,3 +554,8 @@
|
|||||||
- name: rebuild initrd
|
- name: rebuild initrd
|
||||||
command: mkinitcpio -P
|
command: mkinitcpio -P
|
||||||
become: true
|
become: true
|
||||||
|
register: mkinitcpio_cmd
|
||||||
|
failed_when: >
|
||||||
|
mkinitcpio_cmd.rc != 0
|
||||||
|
and
|
||||||
|
not (mkinitcpio_cmd.rc == 1 and "file not found: `fsck.overlay'" in mkinitcpio_cmd.stderr)
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ test_ares() {
|
|||||||
# packages will stay in the container
|
# packages will stay in the container
|
||||||
sed -i '"'"'s/^#\?\(CacheDir.*\)/\1\nCacheDir = \/var\/cache\/pacman\/pkg_host\//'"'"' /etc/pacman.conf
|
sed -i '"'"'s/^#\?\(CacheDir.*\)/\1\nCacheDir = \/var\/cache\/pacman\/pkg_host\//'"'"' /etc/pacman.conf
|
||||||
|
|
||||||
pacman -Syu --noconfirm python3
|
pacman -Syu --noconfirm linux python3
|
||||||
mkdir /var/cache/pacman/pkg_host/
|
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 .
|
||||||
@@ -59,6 +59,17 @@ test_neptune() {
|
|||||||
'
|
'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test_mars() {
|
||||||
|
docker pull docker.io/library/ubuntu:20.04
|
||||||
|
docker run -ti --rm -v ${tmpdir}/dotfiles.tar.gz:/tmp/dotfiles.tar.gz:ro --hostname mars docker.io/library/ubuntu:20.04 sh -c '
|
||||||
|
set -o errexit
|
||||||
|
|
||||||
|
cd $(mktemp -d)
|
||||||
|
tar xf /tmp/dotfiles.tar.gz -C .
|
||||||
|
ANSIBLE_EXTRA_ARGS="-e manage_services=false" ./install.sh
|
||||||
|
'
|
||||||
|
}
|
||||||
|
|
||||||
case "${1:-all}" in
|
case "${1:-all}" in
|
||||||
ares)
|
ares)
|
||||||
test_ares
|
test_ares
|
||||||
@@ -66,8 +77,12 @@ case "${1:-all}" in
|
|||||||
neptune)
|
neptune)
|
||||||
test_neptune
|
test_neptune
|
||||||
;;
|
;;
|
||||||
|
mars)
|
||||||
|
test_mars
|
||||||
|
;;
|
||||||
all)
|
all)
|
||||||
test_ares
|
test_ares
|
||||||
test_neptune
|
test_neptune
|
||||||
|
test_mars
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
62
user.yml
62
user.yml
@@ -301,22 +301,60 @@
|
|||||||
src: ~/.vim/autoload/plug.vim
|
src: ~/.vim/autoload/plug.vim
|
||||||
force: true
|
force: true
|
||||||
|
|
||||||
|
- name: get ycm version before update
|
||||||
|
shell: |
|
||||||
|
if ! [[ -d ~/.local/share/nvim/plugged/YouCompleteMe ]] ; then
|
||||||
|
exit 200
|
||||||
|
fi
|
||||||
|
cd ~/.local/share/nvim/plugged/YouCompleteMe
|
||||||
|
git rev-parse HEAD
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
register: ycm_before_update
|
||||||
|
changed_when: false
|
||||||
|
failed_when: ycm_before_update.rc not in (0, 200)
|
||||||
|
|
||||||
- name: install vim plugins
|
- name: install vim plugins
|
||||||
command: /usr/bin/nvim -f -E -s -c "source ~/.vimrc" +PlugInstall +qall
|
command: /usr/bin/nvim --headless +"PlugInstall --sync" +qall
|
||||||
register: vim_plugins_stdout
|
changed_when: false
|
||||||
check_mode: false
|
|
||||||
changed_when: vim_plugins_stdout.stdout_lines|length != 0
|
- name: install go binaries for vim
|
||||||
|
command: /usr/bin/nvim --headless +GoInstallBinaries +qall
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: update vim plugins
|
||||||
|
command: /usr/bin/nvim --headless +"PlugUpdate --sync" +qall
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: update go binaries for vim
|
||||||
|
command: /usr/bin/nvim --headless +GoUpdateBinaries +qall
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: get ycm version after update
|
||||||
|
shell: |
|
||||||
|
cd ~/.local/share/nvim/plugged/YouCompleteMe
|
||||||
|
git rev-parse HEAD
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
register: ycm_after_update
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: compile youcompleteme
|
- name: compile youcompleteme
|
||||||
# --force-sudo is required, as the script refuses to run
|
# --force-sudo is required, as the script refuses to run in a sudo
|
||||||
# in a sudo environment (i.e. if the SUDO_USER env variable
|
# environment (i.e. if the SUDO_USER env variable is set). But of course,
|
||||||
# is set). But of course, ansible uses that to assume the
|
# ansible uses that to assume the other user. It's fine.
|
||||||
# other user. It's fine.
|
|
||||||
shell: |
|
shell: |
|
||||||
cd ~/.local/share/nvim/plugged/YouCompleteMe/
|
cd ~/.local/share/nvim/plugged/YouCompleteMe
|
||||||
python3 ./install.py --force-sudo
|
python3 ./install.py --force-sudo
|
||||||
args:
|
args:
|
||||||
creates: '~/.local/share/nvim/plugged/YouCompleteMe/third_party/ycmd/ycm_core.cpython-38-x86_64-linux-gnu.so'
|
executable: /bin/bash
|
||||||
|
register: ycm_compile_output
|
||||||
|
failed_when: ycm_compile_output.rc not in (0, 200)
|
||||||
|
when: >
|
||||||
|
(ycm_before_update.rc == 200)
|
||||||
|
or
|
||||||
|
(ycm_before_update.stdout != ycm_after_update.stdout)
|
||||||
|
tags: [vim-plugins]
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: firefox - create chrome directory
|
- name: firefox - create chrome directory
|
||||||
@@ -353,7 +391,7 @@
|
|||||||
- block:
|
- block:
|
||||||
- name: set portfolio performance version
|
- name: set portfolio performance version
|
||||||
set_fact:
|
set_fact:
|
||||||
portfolio_performace_version: "0.50.0"
|
portfolio_performace_version: "0.55.0"
|
||||||
|
|
||||||
- name: look of current installation
|
- name: look of current installation
|
||||||
stat:
|
stat:
|
||||||
@@ -591,7 +629,7 @@
|
|||||||
- block:
|
- block:
|
||||||
- name: add passwordstore init script
|
- name: add passwordstore init script
|
||||||
copy:
|
copy:
|
||||||
dest: /home/{{ user.name }}/bin/pass
|
dest: /home/{{ user.name }}/.optbin/pass
|
||||||
owner: "{{ user.name }}"
|
owner: "{{ user.name }}"
|
||||||
group: "{{ user_group_name }}"
|
group: "{{ user_group_name }}"
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ export LC_COLLATE=C
|
|||||||
|
|
||||||
export DOTFILES=~/dotfiles
|
export DOTFILES=~/dotfiles
|
||||||
|
|
||||||
|
export GOPATH=~/.go
|
||||||
export PATH=$PATH:$(go env GOPATH)/bin
|
export PATH=$PATH:$(go env GOPATH)/bin
|
||||||
|
|
||||||
export ACPI_LID_NAME=LID
|
export ACPI_LID_NAME=LID
|
||||||
|
|||||||
Reference in New Issue
Block a user