--- - name: Install general packages ansible.builtin.package: name: - xmonad - xmonad-contrib - xmobar - alacritty - dunst - redshift - cmus - lightdm - lightdm-gtk-greeter - nnn - trash-cli - tar - zip - unzip - unrar - feh - mpv - nsxiv - zathura - zathura-pdf-mupdf - ttc-iosevka - ttf-liberation - imlib2 - libxext - libxrandr state: present become: true tags: [pc, setup] - name: Install packages from AUR tags: [pc, setup] block: - name: Enable user to use sudo pacman without password become: true ansible.builtin.lineinfile: path: /etc/sudo.conf line: 'max ALL=(ALL) NOPASSWD: /usr/bin/pacman' state: present validate: 'visudo -cf %s' - name: Install language server from AUR kewlfft.aur.aur: use: paru state: present name: - pmount - advmvcp always: - name: Disable user to use sudo pacman without password become: true ansible.builtin.lineinfile: path: /etc/sudo.conf line: 'max ALL=(ALL) NOPASSWD: /usr/bin/pacman' state: absent validate: 'visudo -cf %s' - name: Install laptop specific packages ansible.builtin.package: name: - pavucontrol - pamixer - brightnessctl state: present become: true tags: [t460p, x220, setup] - name: Build and install dmenu community.general.make: chdir: "{{ role_path }}/files/dmenu" target: install become: true tags: [pc, setup] - name: Cleanup built dmenu artifacts community.general.make: chdir: "{{ role_path }}/files/dmenu" target: clean become: true tags: [pc, setup] - name: Build and install slock community.general.make: chdir: "{{ role_path }}/files/slock" target: install become: true tags: [pc, setup] - name: Cleanup built slock artifacts community.general.make: chdir: "{{ role_path }}/files/slock" target: clean become: true tags: [pc, setup] - name: Create config directories ansible.builtin.file: path: "{{ item }}" state: directory mode: '0755' with_items: - ~/.config/xmonad - ~/.config/xmobar - ~/.config/dunst - ~/.config/cmus - ~/.config/redshift - ~/.config/nsxiv - ~/.config/nsxiv/exec - ~/.config/zathura - ~/.config/feh - ~/.config/nnn - ~/.config/fontconfig tags: [pc, setup] - name: Copy over cmus config ansible.builtin.copy: src: "{{ item }}" dest: "~/.config/cmus/" mode: '0644' with_fileglob: "cmus/*" tags: pc - name: Clone nnn repository into temp ansible.builtin.git: repo: https://github.com/jarun/nnn.git force: true dest: /tmp/nnn tags: [pc, setup] - name: Move nnn plugins into right place ansible.builtin.copy: remote_src: true src: /tmp/nnn/plugins/ dest: ~/.config/nnn/plugins/ mode: '0755' tags: [pc, setup] - name: Copy over common config files ansible.builtin.copy: src: "{{ item.src }}" dest: "~/.config/{{ item.dest }}" mode: '0644' tags: pc loop: - { src: alacritty.toml, dest: alacritty.toml } - { src: dunstrc, dest: dunst/dunstrc } - { src: dircolours, dest: dircolours } - { src: redshiftrc, dest: redshift/redshiftrc } - { src: zathurarc, dest: zathura/zathurarc } - { src: feh_keys, dest: feh/keys } - { src: fonts.conf, dest: fontconfig/fonts.conf } - name: Copy over nsixv key handler script ansible.builtin.copy: src: nsxiv_key_handler dest: ~/.config/nsxiv/exec/key-handler mode: '0755' tags: pc - name: Copy over T460p config files ansible.builtin.copy: src: "{{ item.src }}" dest: "{{ item.dest }}" mode: '0644' with_items: - { src: xmonad_t460p.hs, dest: ~/.config/xmonad/xmonad.hs } - { src: xmobarrc_t460p, dest: ~/.config/xmobar/xmobarrc } - { src: bashrc_t460p, dest: ~/.bashrc } - { src: profile_t460p, dest: ~/.profile } - { src: mimeapps_t460p.list, dest: ~/.config/mimeapps.list } tags: t460p - name: Copy over qwerty config files ansible.builtin.copy: src: "{{ item.src }}" dest: "{{ item.dest }}" mode: '0644' with_items: - { src: xmonad_qwerty.hs, dest: ~/.config/xmonad/xmonad.hs } - { src: xmobarrc_qwerty, dest: ~/.config/xmobar/xmobarrc } - { src: bashrc_qwerty, dest: ~/.bashrc } - { src: profile_qwerty, dest: ~/.profile } - { src: mimeapps_qwerty.list, dest: ~/.config/mimeapps.list } tags: qwerty - name: Copy over x220 config files ansible.builtin.copy: src: "{{ item.src }}" dest: "{{ item.dest }}" mode: '0644' with_items: - { src: xmonad_x220.hs, dest: ~/.config/xmonad/xmonad.hs } - { src: xmobarrc_x220, dest: ~/.config/xmobar/xmobarrc } - { src: bashrc_x220, dest: ~/.bashrc } - { src: profile_x220, dest: ~/.profile } - { src: mimeapps_x220.list, dest: ~/.config/mimeapps.list } tags: x220 - name: Remove unwanted files ansible.builtin.file: path: "{{ item }}" state: absent loop: - ~/.bash_profile - name: Enable Lightdm ansible.builtin.service: name: lightdm state: started enabled: true become: true tags: [pc, setup]