Compare commits

..

No commits in common. "634a0b77846274412e4a48a5fa61e23d14c3f7f3" and "942dff9d8c0b76fcbe18f4be45300306b01b1f50" have entirely different histories.

9 changed files with 105 additions and 108 deletions

View file

@ -1,4 +1,3 @@
---
- name: Default - name: Default
hosts: all hosts: all
roles: roles:

View file

@ -1,11 +1,14 @@
--- - name: xrdb-reload
- name: Xrdb-reload command: "xrdb -I{{ ansible_env.HOME }} {{ ansible_env.HOME }}/.config/Xresources/main"
ansible.builtin.command: xrdb -I{{ ansible_env.HOME }} {{ ansible_env.HOME }}/.config/Xresources/main
- name: I3-reload - name: i3-reload
ansible.builtin.command: i3-msg reload command: i3-msg reload
- name: Shell-reload
ansible.builtin.command: "{{ ansible_env.HOME }}/.local/bin/colorSchemeApply" - name: shell-reload
- name: Fzf-reload command: "{{ ansible_env.HOME }}/.local/bin/colorSchemeApply"
ansible.builtin.command: source {{ ansible_env.HOME }}/.local/bin/colorSchemeApplyFzf
- name: Qutebrowser-reload - name: fzf-reload
ansible.builtin.shell: "! pgrep qutebrowser || qutebrowser :config-source" shell: "source {{ ansible_env.HOME }}/.local/bin/colorSchemeApplyFzf"
- name: qutebrowser-reload
shell: "! pgrep qutebrowser || qutebrowser :config-source"

View file

@ -1,24 +1,22 @@
---
- name: Ensure directories for desktop applications are present - name: Ensure directories for desktop applications are present
ansible.builtin.file: file:
state: directory state: directory
path: "{{ ansible_user_dir }}/{{ item }}" path: "{{ ansible_user_dir }}/{{ item }}"
mode: u=rwx,g=rx,o=rx mode: "u=rwx,g=rx,o=rx"
with_items: with_items:
- .config/Xresources - ".config/Xresources"
- .config/rofi - ".config/rofi"
- .local/bin - ".local/bin"
- .local/share/fonts - ".local/share/fonts"
- .config/qutebrowser - ".config/qutebrowser"
- .config/tridactyl/themes - ".config/tridactyl/themes"
# Download fonts # Download fonts
- name: Download Nerd fonts - name: Download Nerd fonts
ansible.builtin.get_url: get_url:
url: https://raw.githubusercontent.com/ryanoasis/nerd-fonts/704336735f576781b2a57b12a0c723e3316cbdec/patched-fonts/DejaVuSansMono/{{ item.folder }}/complete/{{ url: "https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/DejaVuSansMono/{{ item.folder }}/complete/{{ item.filename | urlencode }}"
item.filename | urlencode }}
dest: "{{ ansible_user_dir }}/.local/share/fonts/{{ item.filename }}" dest: "{{ ansible_user_dir }}/.local/share/fonts/{{ item.filename }}"
mode: u=rw,g=r,o=r mode: "u=rw,g=r,o=r"
loop: loop:
- filename: DejaVu Sans Mono Bold Nerd Font Complete Mono.ttf - filename: DejaVu Sans Mono Bold Nerd Font Complete Mono.ttf
folder: Bold folder: Bold
@ -30,16 +28,15 @@
folder: Italic folder: Italic
- name: Download icon fonts - name: Download icon fonts
ansible.builtin.get_url: get_url:
url: https://raw.githubusercontent.com/FortAwesome/Font-Awesome/a8386aae19e200ddb0f6845b5feeee5eb7013687/fonts/fontawesome-webfont.ttf url: "https://raw.githubusercontent.com/FortAwesome/Font-Awesome/a8386aae19e200ddb0f6845b5feeee5eb7013687/fonts/fontawesome-webfont.ttf"
dest: "{{ ansible_user_dir }}/.local/share/fonts/fontawesome-webfont.ttf" dest: "{{ ansible_user_dir }}/.local/share/fonts/fontawesome-webfont.ttf"
mode: u=rw,g=r,o=r mode: "u=rw,g=r,o=r"
# TODO Either replace with ForkAwesome or Nerd Fonts # TODO Either replace with ForkAwesome or Nerd Fonts
- name: Install python dependencies for lemonbar - name: Install python dependencies for lemonbar
ansible.builtin.pip: pip:
requirements: "{{ ansible_user_dir }}/.dotfiles/config/lemonbar/requirements.txt" requirements: "{{ ansible_user_dir }}/.dotfiles/config/lemonbar/requirements.txt"
extra_args: --break-system-packages # It's fine, it's local anyways
# Build a single color scheme and template and assign it to a variable # Build a single color scheme and template and assign it to a variable
- base16_builder: - base16_builder:
@ -61,20 +58,20 @@
- i3 - i3
- name: Configure Alacritty - name: Configure Alacritty
ansible.builtin.template: template:
src: "{{ ansible_env.HOME }}/.config/alacritty/alacritty.yml.j2" src: "{{ ansible_env.HOME }}/.config/alacritty/alacritty.yml.j2"
dest: "{{ ansible_env.HOME }}/.config/alacritty/alacritty.yml" dest: "{{ ansible_env.HOME }}/.config/alacritty/alacritty.yml"
mode: u=rw,g=r,o=r mode: "u=rw,g=r,o=r"
# Alacritty has live config reload, so no command to execute # Alacritty has live config reload, so no command to execute
# However, it doesn't work with yaml includes, hence the template # However, it doesn't work with yaml includes, hence the template
tags: tags:
- color - color
- name: Set base16 theme for Xresources - name: Set base16 theme for Xresources
ansible.builtin.copy: copy:
content: "{{ base16_schemes['schemes'][base16_scheme]['xresources']['xresources']['base16-' + base16_scheme + '-256.Xresources'] }}" content: "{{ base16_schemes['schemes'][base16_scheme]['xresources']['xresources']['base16-' + base16_scheme + '-256.Xresources'] }}"
dest: "{{ ansible_env.HOME }}/.config/Xresources/theme" dest: "{{ ansible_env.HOME }}/.config/Xresources/theme"
mode: u=rw,g=r,o=r mode: "u=rw,g=r,o=r"
notify: notify:
- xrdb-reload - xrdb-reload
tags: tags:
@ -82,30 +79,30 @@
when: display_server == 'x11' when: display_server == 'x11'
- name: Download base16 theme for qutebrowser - name: Download base16 theme for qutebrowser
ansible.builtin.copy: copy:
content: "{{ base16_schemes['schemes'][base16_scheme]['qutebrowser']['themes/minimal']['base16-' + base16_scheme + '.config.py'] }}" content: "{{ base16_schemes['schemes'][base16_scheme]['qutebrowser']['themes/minimal']['base16-' + base16_scheme + '.config.py'] }}"
dest: "{{ ansible_env.HOME }}/.config/qutebrowser/theme.py" dest: "{{ ansible_env.HOME }}/.config/qutebrowser/theme.py"
mode: u=rw,g=r,o=r mode: "u=rw,g=r,o=r"
notify: notify:
- qutebrowser-reload - qutebrowser-reload
tags: tags:
- color - color
- name: Download base16 theme for Tridactyl - name: Download base16 theme for Tridactyl
ansible.builtin.copy: copy:
content: "{{ base16_schemes['schemes'][base16_scheme]['tridactyl']['base16-' + base16_scheme + '.config.py'] }}" content: "{{ base16_schemes['schemes'][base16_scheme]['tridactyl']['base16-' + base16_scheme + '.config.py'] }}"
# url: "https://raw.githubusercontent.com/bezmi/base16-tridactyl/master/base16-{{ base16_scheme }}.css" # url: "https://raw.githubusercontent.com/bezmi/base16-tridactyl/master/base16-{{ base16_scheme }}.css"
dest: "{{ ansible_env.HOME }}/.config/tridactyl/themes/theme.css" dest: "{{ ansible_env.HOME }}/.config/tridactyl/themes/theme.css"
mode: u=rw,g=r,o=r mode: "u=rw,g=r,o=r"
when: false # Not currently used when: False # Not currently used
tags: tags:
- color - color
- name: Configure i3 - name: Configure i3
ansible.builtin.template: template:
src: "{{ ansible_env.HOME }}/.config/i3/config.j2" src: "{{ ansible_env.HOME }}/.config/i3/config.j2"
dest: "{{ ansible_env.HOME }}/.config/i3/config" dest: "{{ ansible_env.HOME }}/.config/i3/config"
mode: u=rw,g=r,o=r mode: "u=rw,g=r,o=r"
notify: notify:
- i3-reload - i3-reload
tags: tags:
@ -114,10 +111,10 @@
when: display_server == 'x11' when: display_server == 'x11'
- name: Set base16 theme for rofi - name: Set base16 theme for rofi
ansible.builtin.copy: copy:
content: "{{ base16_schemes['schemes'][base16_scheme]['rofi']['themes']['base16-' + base16_scheme + '.' + item] }}" content: "{{ base16_schemes['schemes'][base16_scheme]['rofi']['themes']['base16-' + base16_scheme + '.' + item] }}"
dest: "{{ ansible_env.HOME }}/.config/rofi/theme.{{ item }}" dest: "{{ ansible_env.HOME }}/.config/rofi/theme.{{ item }}"
mode: u=rw,g=r,o=r mode: "u=rw,g=r,o=r"
tags: tags:
- color - color
loop: loop:
@ -125,49 +122,49 @@
- rasi - rasi
- name: Configure Dunst - name: Configure Dunst
ansible.builtin.template: template:
src: "{{ ansible_env.HOME }}/.config/dunst/dunstrc.j2" src: "{{ ansible_env.HOME }}/.config/dunst/dunstrc.j2"
dest: "{{ ansible_env.HOME }}/.config/dunst/dunstrc" dest: "{{ ansible_env.HOME }}/.config/dunst/dunstrc"
mode: u=rw,g=r,o=r mode: "u=rw,g=r,o=r"
tags: tags:
- color - color
when: display_server == 'x11' when: display_server == 'x11'
- name: Download base16 theme for fzf - name: Download base16 theme for fzf
ansible.builtin.copy: copy:
content: "{{ base16_schemes['schemes'][base16_scheme]['fzf']['bash']['base16-' + base16_scheme + '.config'] }}" content: "{{ base16_schemes['schemes'][base16_scheme]['fzf']['bash']['base16-' + base16_scheme + '.config'] }}"
dest: "{{ ansible_env.HOME }}/.local/bin/colorSchemeApplyFzf" dest: "{{ ansible_env.HOME }}/.local/bin/colorSchemeApplyFzf"
mode: u=rw,g=r,o=r mode: "u=rw,g=r,o=r"
notify: notify:
- fzf-reload - fzf-reload
tags: tags:
- color - color
- name: Download base16 theme for shell - name: Download base16 theme for shell
ansible.builtin.copy: copy:
content: "{{ base16_schemes['schemes'][base16_scheme]['shell']['script']['base16-' + base16_scheme + '.sh'] }}" content: "{{ base16_schemes['schemes'][base16_scheme]['shell']['script']['base16-' + base16_scheme + '.sh'] }}"
dest: "{{ ansible_env.HOME }}/.local/bin/colorSchemeApply" dest: "{{ ansible_env.HOME }}/.local/bin/colorSchemeApply"
mode: u=rwx,g=rx,o=rx mode: "u=rwx,g=rx,o=rx"
notify: notify:
- shell-reload - shell-reload
when: false # Not currently used when: False # Not currently used
tags: tags:
- color - color
- name: Set used base16 theme for vim - name: Set used base16 theme for vim
ansible.builtin.copy: copy:
path: "{{ ansible_env.HOME }}/.config/vim/colorscheme.vim" path: "{{ ansible_env.HOME }}/.config/vim/colorscheme.vim"
mode: u=rw,g=r,o=r mode: "u=rw,g=r,o=r"
content: colorscheme base16-{{ base16_scheme }} content: "colorscheme base16-{{ base16_scheme }}"
when: false # Not currently used when: False # Not currently used
tags: tags:
- color - color
- name: Enable user services - name: Enable user services
ansible.builtin.systemd: systemd:
name: "{{ item }}" name: "{{ item }}"
state: started state: started
enabled: true enabled: yes
scope: user scope: user
loop: loop:
- pulseaudio - pulseaudio

View file

@ -1,3 +1,3 @@
--- - name: install dotfiles
- name: Install dotfiles command: "{{ ansible_user_dir }}/.dotfiles/config/scripts/dotfiles install"
ansible.builtin.command: "{{ ansible_user_dir }}/.dotfiles/config/scripts/dotfiles install" # TODO A python module to do that, so without an handler

View file

@ -1,26 +1,25 @@
---
- name: Ensure directories for applications are present - name: Ensure directories for applications are present
ansible.builtin.file: file:
state: directory state: directory
path: "{{ ansible_user_dir }}/{{ item }}" path: "{{ ansible_user_dir }}/{{ item }}"
mode: u=rwx,g=rx,o=rx mode: "u=rwx,g=rx,o=rx"
with_items: with_items:
- .cache/zsh - ".cache/zsh"
- .cache/mpd - ".cache/mpd"
- .ssh - ".ssh"
- .local/bin - ".local/bin"
- .ansible/collections/ansible_collections/geoffreyfrogeye - ".ansible/collections/ansible_collections/geoffreyfrogeye"
- name: Install dotfiles repository - name: Install dotfiles repository
ansible.builtin.git: git:
repo: "{% if has_forge_access %}git@git.frogeye.fr:{% else %}https://git.frogeye.fr/{% endif %}geoffrey/dotfiles.git" repo: "{% if has_forge_access %}git@git.frogeye.fr:{% else %}https://git.frogeye.fr/{% endif %}geoffrey/dotfiles.git"
dest: "{{ ansible_user_dir }}/.dotfiles" dest: "{{ ansible_user_dir }}/.dotfiles"
update: true update: yes
notify: install dotfiles notify: install dotfiles
tags: dotfiles_repo tags: dotfiles_repo
# TODO Put actual dotfiles in a subdirectory of the repo, so we don't have to put everything in config # TODO Put actual dotfiles in a subdirectory of the repo, so we don't have to put everything in config
- name: Install python dependencies for scripts - name: Install python dependencies for scripts
ansible.builtin.pip: pip:
requirements: "{{ ansible_user_dir }}/.dotfiles/config/scripts/requirements.txt" requirements: "{{ ansible_user_dir }}/.dotfiles/config/scripts/requirements.txt"
extra_args: --break-system-packages # It's fine, it's local anyways

View file

@ -1,14 +1,13 @@
---
- name: Load extensions - name: Load extensions
ansible.builtin.include_role: include_role:
name: geoffreyfrogeye.{{ extension }}automatrop.entry name: "geoffreyfrogeye.{{ extension }}automatrop.entry"
loop: "{{ extensions }}" loop: "{{ extensions }}"
loop_control: loop_control:
loop_var: extension loop_var: extension
tags: always tags: always
- name: Configure extensions rc sourcing - name: Configure extensions rc sourcing
ansible.builtin.template: template:
src: extrc.sh.j2 src: extrc.sh.j2
dest: "{{ ansible_user_dir }}/.config/shell/extrc" dest: "{{ ansible_user_dir }}/.config/shell/extrc"
mode: u=rw,g=r,o=r mode: "u=rw,g=r,o=r"

View file

@ -1,10 +1,11 @@
- name: Reload systemd daemon - name: Reload systemd daemon
ansible.builtin.systemd: systemd:
daemon_reload: true daemon_reload: yes
listen: systemd changed listen: systemd changed
become: true become: yes
- name: Warn about changed Panfrost config - name: Warn about changed Panfrost config
ansible.builtin.debug: debug:
msg: The Panfrost display driver configuration was changed, but needs a reboot to be applied. msg: "The Panfrost display driver configuration was changed, but needs a reboot to be applied."
listen: panfrost config changed listen: panfrost config changed

View file

@ -1,49 +1,49 @@
# Xorg configuration # Xorg configuration
- name: Check if there is Intel backlight - name: Check if there is Intel backlight
ansible.builtin.stat: stat:
path: /sys/class/backlight/intel_backlight path: /sys/class/backlight/intel_backlight
register: intel_backlight register: intel_backlight
when: display_server == 'x11' when: display_server == 'x11'
- name: Install Intel video drivers (Arch based) - name: Install Intel video drivers (Arch based)
community.general.pacman: pacman:
name: xf86-video-intel name: xf86-video-intel
# state: "{{ intel_backlight.stat.exists }}" # state: "{{ intel_backlight.stat.exists }}"
state: present state: present
become: true become: yes
when: display_server == 'x11' and intel_backlight.stat.exists and arch_based when: display_server == 'x11' and intel_backlight.stat.exists and arch_based
# TODO With software role? Would permit other distributions # TODO With software role? Would permit other distributions
- name: Configure Xorg Intel backlight - name: Configure Xorg Intel backlight
ansible.builtin.copy: copy:
src: xorg/intel_backlight.conf src: xorg/intel_backlight.conf
dest: "{{ item }}/20-intel_backlight.conf" dest: "{{ item }}/20-intel_backlight.conf"
become: true become: yes
when: display_server == 'x11' and intel_backlight.stat.exists when: display_server == 'x11' and intel_backlight.stat.exists
loop: "{{ xorg_common_config_dirs }}" loop: "{{ xorg_common_config_dirs }}"
- name: Configure Xorg joystick behaviour - name: Configure Xorg joystick behaviour
ansible.builtin.copy: copy:
src: xorg/joystick.conf src: xorg/joystick.conf
dest: "{{ item }}/50-joystick.conf" dest: "{{ item }}/50-joystick.conf"
become: true become: yes
when: display_server == 'x11' when: display_server == 'x11'
loop: "{{ xorg_common_config_dirs }}" loop: "{{ xorg_common_config_dirs }}"
- name: List modules we're using - name: List modules we're using
ansible.builtin.slurp: slurp:
src: /proc/modules src: /proc/modules
register: modules register: modules
when: display_server when: display_server
# Not sure the module will be loaded in early setup stages though # Not sure the module will be loaded in early setup stages though
- name: Make panfrost use OpenGL 3.3 - name: Make panfrost use OpenGL 3.3
ansible.builtin.lineinfile: lineinfile:
path: /etc/environment path: /etc/environment
line: PAN_MESA_DEBUG="gl3" line: 'PAN_MESA_DEBUG="gl3"'
regexp: ^#? ?PAN_MESA_DEBUG= regexp: '^#? ?PAN_MESA_DEBUG='
become: true become: yes
when: display_server and using_panfrost when: display_server and using_panfrost
vars: vars:
using_panfrost: "{{ 'panfrost' in (modules.content | b64decode) }}" using_panfrost: "{{ 'panfrost' in (modules.content | b64decode) }}"
@ -51,20 +51,20 @@
# Numlock on boot # Numlock on boot
- name: Set numlock on boot - name: set numlock on boot
ansible.builtin.copy: copy:
src: getty.service src: getty.service
dest: /etc/systemd/system/getty@.service.d/override.conf dest: /etc/systemd/system/getty@.service.d/override.conf
become: true become: yes
notify: notify:
- systemd changed - systemd changed
when: auto_numlock when: auto_numlock
- name: Unset numlock on boot - name: Unset numlock on boot
ansible.builtin.file: file:
path: /etc/systemd/system/getty@.service.d/override.conf path: /etc/systemd/system/getty@.service.d/override.conf
state: absent state: absent
become: true become: yes
notify: notify:
- systemd changed - systemd changed
when: not auto_numlock when: not auto_numlock

View file

@ -1,17 +1,16 @@
---
- name: Create Termux directory - name: Create Termux directory
ansible.builtin.file: file:
state: directory state: directory
path: "{{ ansible_user_dir }}/.termux" path: "{{ ansible_user_dir }}/.termux"
mode: u=rwx,g=rx,o=rx mode: "u=rwx,g=rx,o=rx"
# TODO This is a dotfiles directory. # TODO This is a dotfiles directory.
# Make it not install unless it's Termux # Make it not install unless it's Termux
- name: Silence Termux login message - name: Silence Termux login message
ansible.builtin.file: file:
state: file state: file
path: "{{ ansible_user_dir }}/.hushlogin" path: "{{ ansible_user_dir }}/.hushlogin"
mode: u=rw,g=r,o=r mode: "u=rw,g=r,o=r"
# Build a single color scheme and template and assign it to a variable # Build a single color scheme and template and assign it to a variable
- base16_builder: - base16_builder:
@ -23,10 +22,10 @@
- color - color
- name: Download base16 theme for Termux - name: Download base16 theme for Termux
ansible.builtin.copy: copy:
content: "{{ base16_schemes['schemes'][base16_scheme]['termux']['colors']['base16-' + base16_scheme + '.properties'] }}" content: "{{ base16_schemes['schemes'][base16_scheme]['termux']['colors']['base16-' + base16_scheme + '.properties'] }}"
dest: "{{ ansible_env.HOME }}/.termux/colors.properties" dest: "{{ ansible_env.HOME }}/.termux/colors.properties"
mode: u=rw,g=r,o=r mode: "u=rw,g=r,o=r"
tags: tags:
- color - color