diff --git a/Configs/nvim/.config/nvim/lua/aleidk/options.lua b/Configs/nvim/.config/nvim/lua/aleidk/options.lua index 64152ad..1d1c3a9 100644 --- a/Configs/nvim/.config/nvim/lua/aleidk/options.lua +++ b/Configs/nvim/.config/nvim/lua/aleidk/options.lua @@ -156,6 +156,7 @@ vim.filetype.add({ -- ╰─────────────────────────────────────────────────────────╯ vim.lsp.enable({ "ansiblels", + "bashls", "lua_ls", "nushell", "pyright", diff --git a/Configs/yazi/.config/yazi/keymap.toml b/Configs/yazi/.config/yazi/keymap.toml index af6a85d..cf1eb43 100644 --- a/Configs/yazi/.config/yazi/keymap.toml +++ b/Configs/yazi/.config/yazi/keymap.toml @@ -2,7 +2,7 @@ # If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas. "$schema" = "https://yazi-rs.github.io/schemas/keymap.json" -[manager] +[mgr] prepend_keymap = [ { on = [""], run = "escape --all", desc = "Exit visual mode, clear selected, or cancel search" }, diff --git a/Configs/yazi/.config/yazi/package.toml b/Configs/yazi/.config/yazi/package.toml index 2b66268..a548b83 100644 --- a/Configs/yazi/.config/yazi/package.toml +++ b/Configs/yazi/.config/yazi/package.toml @@ -1,12 +1,7 @@ [[plugin.deps]] use = "yazi-rs/plugins:full-border" -rev = "5186af7" -hash = "ae9e1d0c6bfd68cdebc98cc684c22b45" - -[[plugin.deps]] -use = "GianniBYoung/rsync" -rev = "3f431aa" -hash = "1854a5a30d23e84bc8df24700f27957b" +rev = "1ab21d4" +hash = "3996fc74044bc44144b323686f887e1" [[plugin.deps]] use = "Ape/simple-status" @@ -15,10 +10,10 @@ hash = "68603fdd1dcaf415227e2c77a9317947" [[plugin.deps]] use = "yazi-rs/plugins:smart-enter" -rev = "5186af7" -hash = "aef2b1a805b80cce573bb766f1459d88" +rev = "1ab21d4" +hash = "56fdabc96fc1f4d53c96eb884b02a5be" [[flavor.deps]] use = "yazi-rs/flavors:catppuccin-macchiato" -rev = "c023460" -hash = "3ec21bcfd2735cfcbab61faaf43e59e4" +rev = "d3fd3a5" +hash = "e6c5beeb1da3199355734273ee452a7f" diff --git a/Configs/yazi/.config/yazi/theme.toml b/Configs/yazi/.config/yazi/theme.toml index 000a93b..e0dfd86 100644 --- a/Configs/yazi/.config/yazi/theme.toml +++ b/Configs/yazi/.config/yazi/theme.toml @@ -1,2 +1,3 @@ [flavor] -use = "catppuccin-macchiato" +light = "catppuccin-macchiato" +dark = "catppuccin-macchiato" diff --git a/Configs/yazi/.config/yazi/yazi.toml b/Configs/yazi/.config/yazi/yazi.toml index 3600ca2..8c7ce85 100644 --- a/Configs/yazi/.config/yazi/yazi.toml +++ b/Configs/yazi/.config/yazi/yazi.toml @@ -2,7 +2,7 @@ # If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas. "$schema" = "https://yazi-rs.github.io/schemas/yazi.json" -[manager] +[mgr] ratio = [1, 3, 4] sort_by = "alphabetical" sort_sensitive = false diff --git a/README.md b/README.md index 53b172b..566f550 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,12 @@ Please ensure the that git is installed and you have an ssh key registered, then execute the following command: +```bash +curl -SsL https://git.alecodes.page/alecodes/dots/raw/branch/main/bootstrap/bootstrap.sh | bash +``` + +Optionally, manually clone the repo to `~/.config/dotfiles/` and then execute: + ```bash curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash diff --git a/bootstrap/bootstrap.sh b/bootstrap/bootstrap.sh new file mode 100755 index 0000000..9256bd9 --- /dev/null +++ b/bootstrap/bootstrap.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +set -eou pipefail + +if ! command -v uv >/dev/null 2>&1; then + echo -e "Installing UV...\n" + curl -LsSf https://astral.sh/uv/install.sh | sh +fi + +echo -e "Executing playbook...\n" + +if [[ -d ~/.config/dotfiles ]]; then + pushd ~/.config/dotfiles/bootstrap/ || exit + + # dotfiles are cloned, executed localy + uvx --from ansible ansible-playbook --ask-become-pass -v bootstrap.yaml + +else + + # dotfiles are not cloned, executed remotly + uvx --from ansible ansible-pull --ask-become-pass --url ssh://git@git.alecodes.page:24062/alecodes/dots.git bootstrap/bootstrap.yaml + +fi + +popd || exit + +echo -e "Done!\n" diff --git a/bootstrap/bootstrap.yaml b/bootstrap/bootstrap.yaml new file mode 100644 index 0000000..5a16f2f --- /dev/null +++ b/bootstrap/bootstrap.yaml @@ -0,0 +1,61 @@ +- name: Bootstrap system installation + hosts: localhost + vars_files: + - ./variables.yaml + tasks: + - name: Fedora setup + when: ansible_facts['distribution'] == "Fedora" + block: + - name: Enable copr repos + become: true + loop: "{{ distros.fedora.copr }}" + community.general.copr: + state: enabled + name: "{{ item }}" + + - name: Install packages + become: true + ansible.builtin.package: + state: present + name: "{{ distros.Global.packages }}" + + - name: 'Ensure rustup is setup' + ansible.builtin.command: "{{ (ansible_facts['pkg_mgr'] in ['dnf5']) | ternary('rustup-init -y --no-modify-path', 'rustup --no-modify-path -y') }}" + args: + creates: ~/.cargo/env + + - name: "Installing Cargo Binstall" + ansible.builtin.unarchive: + remote_src: true + src: https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz + dest: "{{ ansible_env.HOME }}/.cargo/bin/" + keep_newer: true + extra_opts: + - "--no-anchored" + - "cargo-binstall" + + + - name: 'Install cargo packages' + loop: "{{ distros[ansible_facts['distribution']].cargo }}" + ansible.builtin.command: + cmd: "cargo binstall --no-confirm --locked {{ item.pkg }}" + creates: "{{ ansible_env.HOME }}/.cargo/bin/{{ item.bin }}" + + - name: Generate an OpenSSH keypair + community.crypto.openssh_keypair: + path: ~/.ssh/id_ed25519 + type: ed25519 + + - name: Clone dotfiles + ignore_errors: true + notify: Deploy dots + ansible.builtin.git: + accept_newhostkey: true + repo: ssh://git@git.alecodes.page:24062/alecodes/dots.git + dest: ~/.config/dotfiles + update: true + version: main + + handlers: + - name: Deploy dots + ansible.builtin.command: tuckr add * diff --git a/bootstrap/variables.yaml b/bootstrap/variables.yaml new file mode 100644 index 0000000..11b9686 --- /dev/null +++ b/bootstrap/variables.yaml @@ -0,0 +1,74 @@ +distros: + Fedora: + copr: + - atim/lazygit + - the4runner/firefox-dev + packages: {} + cargo: + - pkg: yazi-fm + bin: yazi + - pkg: yazi-cli + bin: yazi + + Global: + packages: + - adwaita-cursor-theme + - adwaita-icon-theme + - adwaita-icon-theme-legacy + - adwaita-mono-fonts + - adwaita-sans-fonts + - bat + - breeze-icon-theme + - breeze-icon-theme-fedora + - curl + - duf + - eza + - fd-find + - firefox-dev + - fish + - flatpak + - fzf + - git + - grim + - kitty + - lazygit + - neovim + - nodejs + - openssh + - openssh-askpass + - openssh-clients + - openssh-server + - openssl + - openssl-devel + - openssl-libs + - php-cli + - php-common + - php-intl + - php-mbstring + - php-pecl-zip + - php-process + - php-soap + - php-xml + - rhythmbox + - ripgrep + - rofi-themes + - rofi-wayland + - rofimoji + - rootfiles + - rsync + - rustup + - sd + - sed + - sushi + - swappy + - tailscale + - tealdeer + - trash-cli + - tree + - tree-sitter-cli + - udisks2 + - unrar + - unrar-free + - unzip + - zip + - zoxide