diff --git a/playbooks/bootstrap.yml b/playbooks/bootstrap.yml index f828804..de48b00 100644 --- a/playbooks/bootstrap.yml +++ b/playbooks/bootstrap.yml @@ -76,3 +76,7 @@ # Install and configure VSCode - role: user/editors/vscode tags: vscode + + # Install and configure Helix + - role: user/editors/helix + tags: helix diff --git a/roles/user/editors/helix/files/config.toml b/roles/user/editors/helix/files/config.toml new file mode 100644 index 0000000..4b55ac6 --- /dev/null +++ b/roles/user/editors/helix/files/config.toml @@ -0,0 +1,8 @@ +theme = "dracula_at_night" + +[editor] +line-number = "relative" +rulers = [ 80, 100, 120 ] + +[editor.indent-guides] +render = true diff --git a/roles/user/editors/helix/tasks/install_AlmaLinux.yml b/roles/user/editors/helix/tasks/install_AlmaLinux.yml new file mode 120000 index 0000000..5819c74 --- /dev/null +++ b/roles/user/editors/helix/tasks/install_AlmaLinux.yml @@ -0,0 +1 @@ +install_fedora-family.yml \ No newline at end of file diff --git a/roles/user/editors/helix/tasks/install_CentOS.yml b/roles/user/editors/helix/tasks/install_CentOS.yml new file mode 120000 index 0000000..5819c74 --- /dev/null +++ b/roles/user/editors/helix/tasks/install_CentOS.yml @@ -0,0 +1 @@ +install_fedora-family.yml \ No newline at end of file diff --git a/roles/user/editors/helix/tasks/install_Fedora.yml b/roles/user/editors/helix/tasks/install_Fedora.yml new file mode 120000 index 0000000..5819c74 --- /dev/null +++ b/roles/user/editors/helix/tasks/install_Fedora.yml @@ -0,0 +1 @@ +install_fedora-family.yml \ No newline at end of file diff --git a/roles/user/editors/helix/tasks/install_Ubuntu.yml b/roles/user/editors/helix/tasks/install_Ubuntu.yml new file mode 100644 index 0000000..c921dda --- /dev/null +++ b/roles/user/editors/helix/tasks/install_Ubuntu.yml @@ -0,0 +1,12 @@ +--- +- name: Enable the PPA for Helix + ansible.builtin.apt_repository: + repo: ppa:maveonair/helix-editor + state: present + become: true + +- name: Install the Helix + ansible.builtin.package: + name: helix + state: present + become: true diff --git a/roles/user/editors/helix/tasks/install_fedora-family.yml b/roles/user/editors/helix/tasks/install_fedora-family.yml new file mode 100644 index 0000000..e38ec6a --- /dev/null +++ b/roles/user/editors/helix/tasks/install_fedora-family.yml @@ -0,0 +1,12 @@ +--- +- name: Enable the Copr + community.general.copr: + name: varlad/helix + state: enabled + become: true + +- name: Install the Helix + ansible.builtin.package: + name: helix + state: present + become: true diff --git a/roles/user/editors/helix/tasks/install_openSUSE Tumbleweed.yml b/roles/user/editors/helix/tasks/install_openSUSE Tumbleweed.yml new file mode 120000 index 0000000..c252792 --- /dev/null +++ b/roles/user/editors/helix/tasks/install_openSUSE Tumbleweed.yml @@ -0,0 +1 @@ +install_suse.yml \ No newline at end of file diff --git a/roles/user/editors/helix/tasks/install_suse.yml b/roles/user/editors/helix/tasks/install_suse.yml new file mode 100644 index 0000000..30e655c --- /dev/null +++ b/roles/user/editors/helix/tasks/install_suse.yml @@ -0,0 +1,6 @@ +--- +- name: Install the Helix + ansible.builtin.package: + name: helix + state: present + become: true diff --git a/roles/user/editors/helix/tasks/main.yml b/roles/user/editors/helix/tasks/main.yml new file mode 100644 index 0000000..434d8f7 --- /dev/null +++ b/roles/user/editors/helix/tasks/main.yml @@ -0,0 +1,16 @@ +--- +- name: Packages + ansible.builtin.include_tasks: "install_{{ ansible_distribution }}.yml" + tags: install + +- name: Create directory for Helix config + ansible.builtin.file: + path: ~/.config/helix + state: directory + mode: 0744 + +- name: Install the config + ansible.builtin.copy: + src: files/config.toml + dest: ~/.config/helix/config.toml + mode: 0644