desktop-config/roles/desktop-environment/tasks/hyprland.yml

108 lines
2.8 KiB
YAML
Raw Normal View History

2024-02-25 20:30:31 +01:00
- name: Install build dependencies
become: yes
apt:
state: latest
install_recommends: false
name:
# General
- build-essential
- cmake
- meson
# Hyprland
2024-02-25 20:40:40 +01:00
- libwayland-dev
- wayland-protocols
2024-02-25 20:30:31 +01:00
- libpango1.0-dev
- libtomlplusplus-dev
2024-02-25 20:45:23 +01:00
- libdrm-dev
- libxkbcommon-dev
2024-02-25 20:46:54 +01:00
- libinput-dev
2024-02-25 20:48:57 +01:00
- libgbm-dev
2024-02-25 20:30:31 +01:00
# xdg-desktop-portal-hyprland
- qtbase5-dev
- libspa-0.2-dev
- libpipewire-0.3-dev
- name: Create source folders
become: yes
file:
path: "/usr/local/src/{{ item }}"
state: directory
owner: "{{ ansible_user_id }}"
group: "{{ ansible_user_id }}"
loop:
- "Hyprland"
- "hyprlang"
- "xdg-desktop-portal-hyprland"
- name: Checkout Hyprland repo
ansible.builtin.git:
repo: 'https://github.com/hyprwm/Hyprland.git'
dest: /usr/local/src/Hyprland
version: v0.35.0
2024-02-25 20:42:50 +01:00
force: true
2024-02-25 20:30:31 +01:00
recursive: true
- name: Checkout hyprlang repo
ansible.builtin.git:
repo: 'https://github.com/hyprwm/hyprlang.git'
dest: /usr/local/src/hyprlang
version: v0.4.0
2024-02-25 20:42:50 +01:00
force: true
2024-02-25 20:30:31 +01:00
recursive: true
- name: Checkout xdg-desktop-portal-hyprland repo
ansible.builtin.git:
repo: 'https://github.com/hyprwm/xdg-desktop-portal-hyprland.git'
dest: /usr/local/src/xdg-desktop-portal-hyprland
version: v1.3.1
2024-02-25 20:42:50 +01:00
force: true
2024-02-25 20:30:31 +01:00
recursive: true
- name: Build Hyprland
community.general.make:
chdir: /usr/local/src/Hyprland
target: all
- name: Install Hyprland
become: true
community.general.make:
chdir: /usr/local/src/Hyprland
target: install
- name: Build hyprlang
ansible.builtin.command:
cmd: "{{ item }}"
chdir: /usr/local/src/hyprlang
loop:
- "cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B build"
- "cmake --build build --config Release --target hyprlang -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`"
- name: Install hyprlang
become: yes
ansible.builtin.command:
cmd: "cmake --install build"
chdir: /usr/local/src/hyprlang
- name: Build xdg-desktop-portal-hyprland
ansible.builtin.command:
cmd: "{{ item }}"
chdir: /usr/local/src/xdg-desktop-portal-hyprland
loop:
- "cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DCMAKE_INSTALL_PREFIX=/usr -B build"
- "cmake --build build"
- name: Install xdg-desktop-portal-hyprland
become: yes
ansible.builtin.command:
cmd: "cmake --install build"
chdir: /usr/local/src/xdg-desktop-portal-hyprland
- name: Move xdg-desktop-portal-hyprland.service into place
become: yes
ansible.builtin.copy:
src: /usr/lib/x86_64-linux-gnu/systemd/user/xdg-desktop-portal-hyprland.service
dest: /usr/lib/systemd/user/xdg-desktop-portal-hyprland.service
- name: Reload systemd
ansible.builtin.systemd_service:
daemon_reload: true