diff --git a/chezmoi/.chezmoi.toml.tmpl b/chezmoi/.chezmoi.toml.tmpl index c37f1b9e..f8426640 100644 --- a/chezmoi/.chezmoi.toml.tmpl +++ b/chezmoi/.chezmoi.toml.tmpl @@ -4,3 +4,5 @@ args = [ "-c", "cp {{ "{{ .Target }}" }} {{ "{{ .Target }}" }}.base && code --new-window --wait --merge {{ "{{ .Destination }}" }} {{ "{{ .Target }}" }} {{ "{{ .Target }}" }}.base {{ "{{ .Source }}" }}", ] +[diff] +pager = "diffnav" diff --git a/chezmoi/.chezmoiscripts/run_once_after_20_install-aqua-and-tools.sh b/chezmoi/.chezmoiscripts/run_once_after_20_install-aqua-and-tools.sh index d0c9a33b..2ca31180 100644 --- a/chezmoi/.chezmoiscripts/run_once_after_20_install-aqua-and-tools.sh +++ b/chezmoi/.chezmoiscripts/run_once_after_20_install-aqua-and-tools.sh @@ -15,5 +15,11 @@ chmod +x aqua-installer rm './aqua-installer' +echo "Setting Aqua environment variables..." +export AQUA_ROOT_DIR="${XDG_DATA_HOME:-$HOME/.local/share/aquaproj-aqua}" +export PATH="${AQUA_ROOT_DIR}/bin:$PATH" +export AQUA_GLOBAL_CONFIG=${AQUA_GLOBAL_CONFIG:-${XDG_CONFIG_HOME:-$HOME/.config}/aquaproj-aqua/aqua.yaml} +export AQUA_GENERATE_WITH_DETAIL=true + echo "Installing global tools with Aqua..." aqua install --all diff --git a/chezmoi/.chezmoiscripts/run_once_after_30_install-tools-with-mise.sh b/chezmoi/.chezmoiscripts/run_once_after_30_install-tools-with-mise.sh index 0677fa17..1f17af38 100644 --- a/chezmoi/.chezmoiscripts/run_once_after_30_install-tools-with-mise.sh +++ b/chezmoi/.chezmoiscripts/run_once_after_30_install-tools-with-mise.sh @@ -11,7 +11,7 @@ echo "" echo "Installing Git as Mise needs that as dependency" sudo apt install git -y -curl https://mise.run/ | sh +wget -qO- https://mise.run/ | sh echo "Installing dependencies for building Python..." sudo apt-get update diff --git a/chezmoi/ansible/setup.yaml b/chezmoi/ansible/setup.yaml index c9c3f824..abea5a97 100644 --- a/chezmoi/ansible/setup.yaml +++ b/chezmoi/ansible/setup.yaml @@ -40,7 +40,6 @@ - gnome-tweaks - graphviz - gtk2-engines-murrine - - incus - jc - kitty # Our terminal! - nala @@ -173,6 +172,41 @@ - docker.service - containerd.service + - name: "[BLOCK] Add repo, install and configure Incus" + block: + - name: Add Incus's official GPG key + ansible.builtin.apt_key: + url: https://pkgs.zabbly.com/key.asc + keyring: /etc/apt/keyrings/zabbly.asc + state: present + - name: Add Incus repository + ansible.builtin.apt_repository: + repo: >- + Enabled: yes + Types: deb + URIs: https://pkgs.zabbly.com/incus/stable + Suites: noble + Components: main + Architectures: {{ arch_mapping[ansible_architecture] | default(ansible_architecture) }} + Signed-By: /etc/apt/keyrings/zabbly.asc + filename: incus + state: present + - name: Install Incus and related packages + ansible.builtin.apt: + pkg: + - incus + state: present + update_cache: true + - name: Add incus-admin group + ansible.builtin.group: + name: incus-admin + state: present + - name: Add user to incus-admin group + ansible.builtin.user: + name: "{{ ansible_user }}" + groups: incus-admin + append: true + # === NOTE: This is currently not working on Ubuntu Asahi # - name: "[BLOCK] Add repo, install and configure Firefox" # block: diff --git a/chezmoi/dot_bashrc b/chezmoi/dot_bashrc index db4525fd..74949e19 100644 --- a/chezmoi/dot_bashrc +++ b/chezmoi/dot_bashrc @@ -58,6 +58,12 @@ export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.local/bin:$PATH" export PATH="$HOME/bin:$PATH" +# Add Aqua variables +export AQUA_ROOT_DIR="${XDG_DATA_HOME:-$HOME/.local/share/aquaproj-aqua}" +export PATH="${AQUA_ROOT_DIR}/bin:$PATH" +export AQUA_GLOBAL_CONFIG=${AQUA_GLOBAL_CONFIG:-${XDG_CONFIG_HOME:-$HOME/.config}/aquaproj-aqua/aqua.yaml} +export AQUA_GENERATE_WITH_DETAIL=true + # Activate Mise: https://github.com/jdx/mise. if command -v mise &> /dev/null; then eval "$(mise activate bash)" diff --git a/chezmoi/dot_config/aquaproj-aqua/aqua.yaml b/chezmoi/dot_config/aquaproj-aqua/aqua.yaml index 54d4fe04..d73ffccb 100644 --- a/chezmoi/dot_config/aquaproj-aqua/aqua.yaml +++ b/chezmoi/dot_config/aquaproj-aqua/aqua.yaml @@ -349,3 +349,15 @@ packages: - name: itaysk/kubectl-neat@v2.0.4 description: Clean up Kubernetes yaml and json output to make it readable link: https://github.com/itaysk/kubectl-neat +- name: Lifailon/lazyjournal@0.6.0 + description: TUI for journalctl, file system logs, as well Docker and Podman containers for quick viewing and filtering with fuzzy find, regex support (like fzf and grep) and coloring the output, written in Go with the gocui library + link: https://github.com/Lifailon/lazyjournal +- name: robinovitch61/kl@v0.5.0 + description: An interactive Kubernetes log viewer for your terminal + link: https://github.com/robinovitch61/kl +- name: Canop/rhit@v2.0.3 + description: A nginx log explorer + link: https://github.com/Canop/rhit +- name: Automattic/harper/harper-ls@v0.14.0 + description: The Grammar Checker for Developers + link: https://github.com/Automattic/harper diff --git a/chezmoi/dot_config/fish/conf.d/20_aliases.fish b/chezmoi/dot_config/fish/conf.d/20_aliases.fish index 94735ca2..1f24cfd8 100644 --- a/chezmoi/dot_config/fish/conf.d/20_aliases.fish +++ b/chezmoi/dot_config/fish/conf.d/20_aliases.fish @@ -13,7 +13,3 @@ alias tfplan='terraform plan -out=plan.tfplan' alias pbcopy='xclip -selection clipboard' alias pbpaste='xclip -selection clipboard -o' alias cb='flatpak run app.getclipboard.Clipboard' - -# Provision Hetzner GitLab Runners using scheduled pipelines trigger -alias gl_runner_up='glab -R el-capitano/operations/hetzner-cloud-runners schedule run 2691862' -alias gl_runner_down='glab -R el-capitano/operations/hetzner-cloud-runners schedule run 383558' diff --git a/chezmoi/dot_config/fish/functions/gl_runner.fish b/chezmoi/dot_config/fish/functions/gl_runner.fish new file mode 100644 index 00000000..77d8c87c --- /dev/null +++ b/chezmoi/dot_config/fish/functions/gl_runner.fish @@ -0,0 +1,30 @@ +# set -g gl_runner_optspec 'b/backend=' no-plan + +function gl_runner --description 'Manage the Hetzner Cloud Runner.' + set -l up_schedule_id '2691862' + set -l down_schedule_id '383558' + set -l project_path 'el-capitano/operations/hetzner-cloud-runners' + + if test -z $argv + echo "No command given: set either 'up' or 'down'" + return 1 + end + + set -l action $argv[1] + + if test $action = "up" + echo "Starting runner..." + glab -R $project_path schedule run $up_schedule_id + else if test $action = "down" + echo "Stopping runner..." + glab -R $project_path schedule run $down_schedule_id + + else + echo "Unknown command, set either 'up' or 'down'" + return 1 + end + + + sleep 5 # Pipeline creation is async, so we wait... + glab -R $project_path ci status -b main --live --compact +end