Compare commits

..

11 Commits

5 changed files with 122 additions and 29 deletions

View File

@@ -389,6 +389,9 @@ packages:
ncdu:
ubuntu: ["ncdu"]
archlinux: ["ncdu"]
signal:
ubuntu: []
archlinux: ["signal-desktop"]
remove:
mousepad:

View File

@@ -98,6 +98,24 @@
shell: /bin/bash
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
shell: |
set -o errexit
@@ -435,24 +453,37 @@
tags: [yubikey-touch-detector]
- block:
- name: add spotify apt key
apt_key:
url: "https://download.spotify.com/debian/pubkey_0D811D58.gpg"
id: "D1742AD60D811D58"
become: true
- block:
- name: add spotify apt key
apt_key:
url: "https://download.spotify.com/debian/pubkey_0D811D58.gpg"
id: "D1742AD60D811D58"
become: true
- name: add spotify repository
apt_repository:
repo: "deb http://repository.spotify.com stable non-free"
filename: spotify
become: true
- name: add spotify repository
apt_repository:
repo: "deb http://repository.spotify.com stable non-free"
filename: spotify
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]
- block:
@@ -523,3 +554,8 @@
- name: rebuild initrd
command: mkinitcpio -P
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)

View File

@@ -40,7 +40,7 @@ test_ares() {
# packages will stay in the container
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/
cd $(mktemp -d)
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
ares)
test_ares
@@ -66,8 +77,12 @@ case "${1:-all}" in
neptune)
test_neptune
;;
mars)
test_mars
;;
all)
test_ares
test_neptune
test_mars
;;
esac

View File

@@ -301,22 +301,60 @@
src: ~/.vim/autoload/plug.vim
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
command: /usr/bin/nvim -f -E -s -c "source ~/.vimrc" +PlugInstall +qall
register: vim_plugins_stdout
check_mode: false
changed_when: vim_plugins_stdout.stdout_lines|length != 0
command: /usr/bin/nvim --headless +"PlugInstall --sync" +qall
changed_when: false
- 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
# --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.
# --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: |
cd ~/.local/share/nvim/plugged/YouCompleteMe/
cd ~/.local/share/nvim/plugged/YouCompleteMe
python3 ./install.py --force-sudo
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:
- name: firefox - create chrome directory
@@ -353,7 +391,7 @@
- block:
- name: set portfolio performance version
set_fact:
portfolio_performace_version: "0.50.0"
portfolio_performace_version: "0.55.0"
- name: look of current installation
stat:
@@ -591,7 +629,7 @@
- block:
- name: add passwordstore init script
copy:
dest: /home/{{ user.name }}/bin/pass
dest: /home/{{ user.name }}/.optbin/pass
owner: "{{ user.name }}"
group: "{{ user_group_name }}"
mode: '0755'

View File

@@ -38,6 +38,7 @@ export LC_COLLATE=C
export DOTFILES=~/dotfiles
export GOPATH=~/.go
export PATH=$PATH:$(go env GOPATH)/bin
export ACPI_LID_NAME=LID