Compare commits
6 Commits
8730ff086a
...
main
Author | SHA1 | Date | |
---|---|---|---|
b25a30615b | |||
452ce614ef | |||
0d520f7bbf | |||
f560e4a942 | |||
4fdd55da97 | |||
6329e7230d |
@@ -1,8 +1,9 @@
|
|||||||
{{- $email := promptStringOnce . "email" "What's your email?" }}
|
{{- $email := promptStringOnce . "email" "What's your email" }}
|
||||||
{{- $git_name := promptStringOnce . "git_name" "What's your Git name?" }}
|
{{- $git_name := promptStringOnce . "git_name" "What's your Git name" }}
|
||||||
|
|
||||||
{{- $shell := promptBoolOnce . "features.shell" "Do you want to install the Fish shell?" true }}
|
{{- $shell := promptBoolOnce . "features.shell" "Do you want to install the Fish shell" true }}
|
||||||
{{- $git := promptBoolOnce . "features.git" "Do you want to install Git?" true }}
|
{{- $git := promptBoolOnce . "features.git" "Do you want to install Git" true }}
|
||||||
|
{{- $editor := promptBoolOnce . "features.editor" "Do you want to install Neovim" true }}
|
||||||
|
|
||||||
[data]
|
[data]
|
||||||
email = {{ $email | quote }}
|
email = {{ $email | quote }}
|
||||||
@@ -11,3 +12,4 @@ git_name = {{ $git_name | quote }}
|
|||||||
[data.features]
|
[data.features]
|
||||||
shell = {{ $shell }}
|
shell = {{ $shell }}
|
||||||
git = {{ $git }}
|
git = {{ $git }}
|
||||||
|
editor = {{ $editor }}
|
||||||
|
@@ -1,6 +1,12 @@
|
|||||||
{{- if not .features.shell }}
|
{{- if not .features.shell }}
|
||||||
.config/fish
|
.config/fish
|
||||||
|
.config/starship.toml
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if not .features.git }}
|
{{- if not .features.git }}
|
||||||
.config/git
|
.config/git
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if not .features.editor }}
|
||||||
|
.config/nvim
|
||||||
|
{{- end }}
|
||||||
|
@@ -24,8 +24,12 @@ trap 'echo -e "\n\033[1;31mError: Script \"$SCRIPT_PATH\" failed at line $LINENO
|
|||||||
# </init>
|
# </init>
|
||||||
# <core>
|
# <core>
|
||||||
|
|
||||||
|
# Ask for confirmation before running the script
|
||||||
while true; do
|
while true; do
|
||||||
read -p "Do you want to run the setup script? [Y/n]: " -n 1 -r REPLY
|
read -p "Do you want to run the setup script? [Y/n]: " -n 1 -r REPLY
|
||||||
|
|
||||||
|
# Clear the input buffer and add a newline
|
||||||
|
while read -t 0.001 TMP; do continue; done
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Convert to lowercase and default to 'y' if empty
|
# Convert to lowercase and default to 'y' if empty
|
||||||
|
7
home/private_dot_config/fish/conf.d/aliases.fish.tmpl
Normal file
7
home/private_dot_config/fish/conf.d/aliases.fish.tmpl
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
abbr --add --position command l ls -lAh
|
||||||
|
|
||||||
|
{{- if .features.editor }}
|
||||||
|
# Alias `vi` and `vim` to Neovim
|
||||||
|
abbr --add --position command vim nvim
|
||||||
|
abbr --add --position command vi nvim
|
||||||
|
{{- end }}
|
@@ -0,0 +1,4 @@
|
|||||||
|
{{- if .features.editor }}
|
||||||
|
# Set Neovim to be the default editor
|
||||||
|
set --export EDITOR nvim
|
||||||
|
{{- end }}
|
2
home/private_dot_config/fish/conf.d/path.fish.tmpl
Normal file
2
home/private_dot_config/fish/conf.d/path.fish.tmpl
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Add `~/.local/bin` to PATH
|
||||||
|
set fish_user_paths {{ joinPath .chezmoi.homeDir ".local/bin" }}
|
5
home/private_dot_config/fish/conf.d/staship.fish
Normal file
5
home/private_dot_config/fish/conf.d/staship.fish
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Disable the default Fish greeting message
|
||||||
|
set fish_greeting ""
|
||||||
|
|
||||||
|
# Initialize Starship
|
||||||
|
starship init fish | source
|
6
home/private_dot_config/nvim/init.lua
Normal file
6
home/private_dot_config/nvim/init.lua
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
-- Enable relative line numbers
|
||||||
|
vim.opt.number = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
|
-- Highlight the current line
|
||||||
|
vim.opt.cursorline = true
|
@@ -27,3 +27,5 @@
|
|||||||
when: features.shell == true
|
when: features.shell == true
|
||||||
- role: git
|
- role: git
|
||||||
when: features.git == true
|
when: features.git == true
|
||||||
|
- role: editor
|
||||||
|
when: features.editor == true
|
||||||
|
5
setup-script/roles/editor/tasks/main.yaml
Normal file
5
setup-script/roles/editor/tasks/main.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- name: Install Neovim on Arch
|
||||||
|
become: true
|
||||||
|
ansible.builtin.pacman:
|
||||||
|
name: neovim
|
||||||
|
when: chezmoi.osRelease.id == "arch"
|
@@ -1,7 +1,10 @@
|
|||||||
- name: Install Fish shell on Arch
|
- name: Install Fish shell and Starship on Arch
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.pacman:
|
ansible.builtin.pacman:
|
||||||
name: fish
|
name:
|
||||||
|
- fish
|
||||||
|
- starship
|
||||||
|
- ttf-nerd-fonts-symbols # Required for Starship
|
||||||
when: chezmoi.osRelease.id == "arch"
|
when: chezmoi.osRelease.id == "arch"
|
||||||
|
|
||||||
- name: Find Fish shell binary
|
- name: Find Fish shell binary
|
||||||
|
Reference in New Issue
Block a user