diff --git a/.agents/AGENTS.md b/.agents/AGENTS.md new file mode 100644 index 0000000..e477065 --- /dev/null +++ b/.agents/AGENTS.md @@ -0,0 +1,3 @@ +# Rules + +- Always use the `favilo/` prefix for all Jujutsu (jj) and Git bookmarks/branches (e.g., `favilo/my-branch-name`). diff --git a/.ansible-lint b/.ansible-lint index 29979ae..22d31ff 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -20,9 +20,9 @@ skip_list: # Modules the lint env can't resolve; we mock them so syntax-check passes. mock_modules: - - kewlfft.aur.aur - snap - community.general.snap - community.general.npm - community.general.pacman - community.general.flatpak + - kewlfft.aur.aur diff --git a/bin/dot-bootstrap b/bin/dot-bootstrap index 4d345a3..dcbb467 100755 --- a/bin/dot-bootstrap +++ b/bin/dot-bootstrap @@ -13,7 +13,7 @@ detect_os() { install_prereqs() { local os="$1" - local pkgs=(ansible just git curl) + local pkgs=(ansible just git curl selene lua-language-server uv prek) # Check if all packages are already installed local install_needed=false @@ -32,18 +32,41 @@ install_prereqs() { ubuntu | debian | pop | mint) echo "Installing Debian/Ubuntu prerequisites..." sudo apt-get update - sudo apt-get install -y ansible just git curl + sudo apt-get install -y ansible just git curl lua-language-server || true + if ! command -v uv &>/dev/null; then + echo "Installing uv..." + curl -LsSf https://astral.sh/uv/install.sh | sh + fi + if ! command -v selene &>/dev/null; then + echo "Installing selene via cargo..." + if command -v cargo &>/dev/null; then + cargo install selene + fi + fi ;; arch | manjaro) echo "Installing Arch Linux prerequisites..." - sudo pacman -Sy --needed --noconfirm ansible just git curl + sudo pacman -Sy --needed --noconfirm ansible just git curl selene lua-language-server uv ;; *) echo "Unsupported OS: $os" - echo "Please ensure ansible, just, git, and curl are installed manually." + echo "Please ensure ansible, just, git, curl, selene, lua-language-server, uv, and prek are installed manually." exit 1 ;; esac + + if ! command -v prek &>/dev/null; then + echo "Installing prek via uv..." + local uv_path="uv" + if ! command -v uv &>/dev/null; then + if [ -f "$HOME/.local/bin/uv" ]; then + uv_path="$HOME/.local/bin/uv" + elif [ -f "$HOME/.cargo/bin/uv" ]; then + uv_path="$HOME/.cargo/bin/uv" + fi + fi + "$uv_path" tool install prek + fi } install_collections() { diff --git a/justfile b/justfile index cc5ef6f..8bb9895 100644 --- a/justfile +++ b/justfile @@ -2,14 +2,15 @@ mod nvim 'roles/nvim/files' -# Install bootstrap prerequisites and Ansible Galaxy collections without running the playbook -bootstrap: - bin/dot-bootstrap --no-playbook - +# Bootstrap the system dependencies and setup configuration. +bootstrap *ARGS: + ./bin/dot-bootstrap {{ ARGS }} # Auto-format in place. Pass a hook id to run just that one, e.g. `just fmt stylua-github`. fmt HOOK="": prek run --hook-stage manual {{ HOOK }} --all-files +format: fmt + # Run check-only hooks (no changes). Pass a hook id to run just that one, e.g. `just check shellcheck`. check HOOK="": prek run {{ HOOK }} --all-files diff --git a/library/yay b/library/yay deleted file mode 100644 index d9f9297..0000000 --- a/library/yay +++ /dev/null @@ -1,267 +0,0 @@ -#!/usr/local/bin/python - -# The MIT License (MIT) -# -# Copyright (c) 2014 Austin Hyde -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -def yay_in_path(module): - rc, _, _ = module.run_command('which yay', check_rc=False) - return rc == 0 - - -def pacman_in_path(module): - rc, _, _ = module.run_command('which pacman', check_rc=False) - return rc == 0 - -def get_version(yay_output): - '''Take yay -Qi or yay -Si output and get the Version''' - lines = yay_output.split('\n') - for line in lines: - if 'Version' in line: - return line.split(':')[1].strip() - return None - -def query_package(module, pkg, state): - ''' - Query the package status in both the local system and the repository. - Returns three booleans to indicate: - * If the package is installed - * If the package is up-to-date - * Whether online information was available - ''' - local_check_cmd = 'yay -Qi %s' % pkg - local_check_rc, local_check_stdout, _ = module.run_command(local_check_cmd, check_rc=False) - if local_check_rc != 0: - return False, False, False - - # No need to check for the repo version in some situations - # Indicate the package is out-of-date, because we chose not to check - if state == 'present' or state == 'absent': - return True, False, False - - local_version = get_version(local_check_stdout) - - repo_check_cmd = 'yay -Si %s' % pkg - repo_check_rc, repo_check_stdout, repo_check_stderr = module.run_command(repo_check_cmd, check_rc=False) - repo_version = get_version(repo_check_stdout) - - if repo_check_rc == 0 and repo_check_stderr == '': - return True, (local_version == repo_version), False - else: - # Indicate package is up-to-date, but just because we hit an error contacting the repo - return True, True, True - -def update_package_db(module): - rc, _, stderr = module.run_command('yay -Sy', check_rc=False) - - if rc == 0 and stderr == '': - return False, 'Package DB up-to-date' - elif rc == 1 and stderr == '': - return True, 'Updated the package DB' - else: - module.fail_json(msg='could not update package db: %s' % stderr) - -def upgrade(module): - check_rc, check_stdout, check_stderr = module.run_command('yay -Qqu', check_rc=False) - - if check_rc == 0 and check_stderr == '' and module.check_mode: - return True, '%s package(s) would be upgraded' % (len(check_stdout.split('\n')) - 1) - elif check_rc == 0 and check_stderr == '' and not module.check_mode: - upgrade_rc, _, upgrade_stderr = module.run_command( - 'yay -Su --noconfirm', - check_rc=False, - ) - - if upgrade_rc == 0: - return True, 'System upgraded' - else: - module.fail_json(msg='unable to upgrade: %s' % upgrade_stderr) - elif check_rc == 1 and check_stderr == '': - return False, 'Nothing to upgrade' - else: - module.fail_json(msg='unable to check for upgrade: %s' % check_stderr) - -def get_sudo_user(module): - # ansible sets the SUDO_USER environment variable. Default to using this, - # checking USER and then `logname` as backups. - user = os.environ.get('SUDO_USER') or os.environ.get('USER') - - if not user: - rc, stdout, _ = module.run_command('logname', check_rc=True) - user = stdout - - return user - -def check_packages(module, pkgs, state): - would_be_changed = [] - - for pkg in pkgs: - installed, updated, _ = query_package(module, pkg, state) - if ((state in ['present', 'latest'] and not installed) or - (state == 'latest' and not updated) or - (state == 'absent' and installed)): - would_be_changed.append(pkg) - - word = 'installed' - if state == 'absent': - word = 'removed' - - if would_be_changed: - return True, '%s package(s) would be %s' % (len(would_be_changed), word) - else: - return False, 'All packages are already %s' % word - -def install_packages(module, pkgs, state): - num_installed = 0 - package_err = [] - message = '' - - sudo_user = get_sudo_user(module) - cmd = 'sudo -u %s yay --noconfirm -S %s' - - for pkg in pkgs: - installed, updated, latest_error = query_package(module, pkg, state) - if latest_error and state == 'latest': - package_err.append(pkg) - - if installed and (state == 'present' or (state == 'latest' and updated)): - continue - - rc, _, stderr = module.run_command(cmd % (sudo_user, pkg), check_rc=False) - - if rc != 0: - module.fail_json(msg='Failed to install package %s, because: %s' % (pkg, stderr)) - - num_installed += 1 - - if state == 'latest' and len(package_err) > 0: - message = 'But could not ensure "latest" state for %s package(s) as remote version could not be fetched.' % package_err - - if num_installed > 0: - return True, 'Installed %s package(s). %s' % (num_installed, message) - else: - return False, 'All packages were already installed. %s' % message - -def remove_packages(module, pkgs, recurse, state): - num_removed = 0 - - arg = 'R' - word = 'remove' - if recurse: - arg = 'Rs' - word = 'recursively remove' - - cmd = 'pacman -%s --noconfirm %s' - - for pkg in pkgs: - installed, _, _ = query_package(module, pkg, state) - if not installed: - continue - - rc, _, stderr = module.run_command(cmd % (arg, pkg), check_rc=False) - - if rc != 0: - module.fail_json(msg='failed to %s package %s because: %s' % (word, pkg, stderr)) - - num_removed += 1 - - if num_removed > 0: - return True, 'Removed %s package(s)' % num_removed - else: - return False, 'All packages were already removed' - - -def main(): - module = AnsibleModule( - argument_spec = dict( - name = dict(type='list'), - state = dict( - default='present', - choices=['absent', 'present', 'latest'], - ), - recurse = dict(default='no', type='bool'), - upgrade = dict(default='no', type='bool'), - update_cache = dict( - default='no', - aliases=['update-cache'], - type='bool', - ), - ), - required_one_of = [['name', 'update_cache', 'upgrade']], - supports_check_mode = True - ) - - if not yay_in_path(module): - module.fail_json(msg="could not locate yay executable") - - if not pacman_in_path(module): - module.fail_json(msg="could not locate pacman executable") - - p = module.params - - changed = False - messages = [] - if p["update_cache"] and not module.check_mode: - updated, update_message = update_package_db(module) - changed = changed or updated - messages.append(update_message) - - if p['update_cache'] and module.check_mode: - changed = True - messages.append('Would have updated the package cache') - - if p['upgrade']: - upgraded, upgrade_message = upgrade(module) - changed = changed or upgraded - messages.append(upgrade_message) - - if p['name'] and module.check_mode: - packages_would_change, check_message = check_packages( - module, - p['name'], - p['state'], - ) - changed = changed or packages_would_change - messages.append(check_message) - elif p['name'] and not module.check_mode: - if p['name']: - if p['state'] in ['present', 'latest']: - packages_changed, package_message = install_packages( - module, - p['name'], - p['state'], - ) - elif p['state'] == 'absent': - packages_changed, package_message = remove_packages( - module, - p['name'], - p['recurse'], - p['state'], - ) - - changed = changed or packages_changed - messages.append(package_message) - - module.exit_json(changed=changed, msg='. '.join(messages)) - - -from ansible.module_utils.basic import * -main() diff --git a/roles/firefox/tasks/main.yml b/roles/firefox/tasks/main.yml index ef1936d..7145543 100644 --- a/roles/firefox/tasks/main.yml +++ b/roles/firefox/tasks/main.yml @@ -1,17 +1,33 @@ -- set_fact: - firefox_dir: "{{dotfiles_user_home}}/snap/firefox/common/.mozilla/firefox" - profiles_dir: "{{dotfiles_user_home}}/snap/firefox/common/.mozilla/firefox" - when: ansible_os_family != "Darwin" +- name: Find candidate profiles.ini files + stat: + path: "{{ item }}" + register: profiles_ini_candidates + with_items: + - "{{dotfiles_user_home}}/Library/Application Support/Firefox/profiles.ini" + - "{{dotfiles_user_home}}/.mozilla/firefox/profiles.ini" + - "{{dotfiles_user_home}}/snap/firefox/common/.mozilla/firefox/profiles.ini" + - "{{dotfiles_user_home}}/.var/app/org.mozilla.firefox/.mozilla/firefox/profiles.ini" -- set_fact: - firefox_dir: "{{dotfiles_user_home}}/Library/Application Support/Firefox/" - profiles_dir: "{{dotfiles_user_home}}/Library/Application Support/Firefox/Profiles" - when: ansible_os_family == "Darwin" +- name: Determine if any profiles.ini exists + set_fact: + found_profiles_ini: "{{ (profiles_ini_candidates.results | selectattr('stat.exists') | map(attribute='item') | first) | default('') }}" -- name: Check if profiles.ini exists - stat: - path: "{{ firefox_dir }}/profiles.ini" - register: profiles_ini_stat +- name: Set Firefox facts if profiles.ini is found + set_fact: + firefox_dir: "{{ found_profiles_ini | dirname }}" + profiles_dir: >- + {{ + (found_profiles_ini | dirname ~ '/Profiles') + if (ansible_os_family == 'Darwin') + else (found_profiles_ini | dirname) + }} + when: found_profiles_ini != "" + +- name: Set profiles_ini_stat fact + set_fact: + profiles_ini_stat: + stat: + exists: "{{ found_profiles_ini != '' }}" - name: Read Firefox profiles shell: | @@ -26,6 +42,7 @@ register: profiles when: profiles_ini_stat.stat.exists changed_when: false + check_mode: false - name: Create chrome directories file: @@ -41,3 +58,12 @@ state: hard with_items: "{{ profiles.stdout_lines }}" when: profiles_ini_stat.stat.exists + +- name: Enable userChrome.css in user.js + lineinfile: + path: "{{profiles_dir}}/{{ item }}/user.js" + line: 'user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);' + create: yes + mode: "0644" + with_items: "{{ profiles.stdout_lines }}" + when: profiles_ini_stat.stat.exists diff --git a/roles/nvim/files/lazy-lock.json b/roles/nvim/files/lazy-lock.json index 41ddd45..6072ee4 100644 --- a/roles/nvim/files/lazy-lock.json +++ b/roles/nvim/files/lazy-lock.json @@ -1,61 +1,62 @@ { "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "HowMuch": { "branch": "master", "commit": "787ead49e6311dc77b8e07a3aca79cbd6feab34c" }, - "LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" }, + "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, "actions-preview.nvim": { "branch": "master", "commit": "0ac9c2aa3cfc8c885321c0862b50b6b1c3392405" }, - "ansi.nvim": { "branch": "main", "commit": "95de464c315ecbe9d7ca3d9a203ef85def0cf6aa" }, + "ansi.nvim": { "branch": "main", "commit": "195b64c3da1c22c2e95648dcbdc6ed075d507064" }, "baleia.nvim": { "branch": "main", "commit": "710537ff5cd669c5a76c5f5b6a9169fd9b913d18" }, "black-nvim": { "branch": "master", "commit": "8fb3efc562b67269e6f31f8653297f826534fa4b" }, "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, "blink.compat": { "branch": "main", "commit": "2ed6d9a28b07fa6f3bface818470605f8896408c" }, - "blink.lib": { "branch": "main", "commit": "e8cd0d6b0ffac8e1cd33ce66df70a8b24808b4cd" }, + "blink.lib": { "branch": "main", "commit": "5876dd95deeb70aadbe9f1c0b7117a135061cdac" }, "cmp-digraphs": { "branch": "master", "commit": "5efc1f0078d7c5f3ea1c8e3aad04da3fd6e081a9" }, "codecompanion-history.nvim": { "branch": "main", "commit": "bc1b4fe06eaaf0aa2399be742e843c22f7f1652a" }, - "codecompanion.nvim": { "branch": "main", "commit": "7cc35b7f7f08d093469fa9ae67d3af716bd729c3" }, - "copilot.lua": { "branch": "master", "commit": "7df55b20b5b653941f0bcff87e559cabb6fafeb0" }, + "codecompanion.nvim": { "branch": "main", "commit": "c8bd2d0ff58b75d9a76f0a17115581754824b725" }, + "copilot.lua": { "branch": "master", "commit": "760912b5992e1d6437378a9c7f2b0cb950966cf5" }, "crates.nvim": { "branch": "main", "commit": "694357861ec9ebf12475ddcdd04ea45a0923c32d" }, "diagram.nvim": { "branch": "master", "commit": "a221810b17cdda2d5fdddba9bab3eba6fab8fabc" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "fern.vim": { "branch": "main", "commit": "3d580357c09e199b0fa7d560b2db1ad05de02b9c" }, "ferris.nvim": { "branch": "main", "commit": "275865530d753a205740804f1ce163af2322db57" }, - "fidget.nvim": { "branch": "main", "commit": "82404b196e73a00b1727a91903beef5ddc319d22" }, + "fidget.nvim": { "branch": "main", "commit": "6f793b2bcd2d35e201c09520f698bb763220908a" }, "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, "git-worktree.nvim": { "branch": "main", "commit": "3ad8c17a3d178ac19be925284389c14114638ebb" }, - "gitsigns.nvim": { "branch": "main", "commit": "25050e4ed39e628282831d4cbecb1850454ce915" }, + "gitsigns.nvim": { "branch": "main", "commit": "eb60cc7b94c46005237fd34170d76f3a089a90aa" }, + "hererocks": { "branch": "master", "commit": "3db37265c3839cbd4d27fc73f92fa7b58bc3a76f" }, "hunk.nvim": { "branch": "master", "commit": "c8a8e7b6973576f63e5bf39aa8338d7f37f4dc53" }, "hydra.nvim": { "branch": "main", "commit": "8c4a9f621ec7cdc30411a1f3b6d5eebb12b469dc" }, "image.nvim": { "branch": "master", "commit": "88351f1f7d9dbae286e671ce3690a49660dd8a5c" }, "iron.nvim": { "branch": "master", "commit": "88cd340407b959f1168af2a6ae5a3d180e6df32c" }, "jj-diffconflicts": { "branch": "main", "commit": "a2aa9a247b56d2c1a6f6be81bcf41c5450cc82ff" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, - "lean.nvim": { "branch": "main", "commit": "fde0d5692edcc0a0cadad77067dfd49a51332236" }, + "lean.nvim": { "branch": "main", "commit": "32fb8aa2edf3f172c307957dc7083e6c7f6caa7e" }, "lsp-format.nvim": { "branch": "master", "commit": "e2b4ae87545c1aadebcf1dfc1b5dffe28dcf2ffb" }, "lsp_signature.nvim": { "branch": "master", "commit": "b7ace9ddb1640ce266012a45a672dfdaedfa5ec6" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "21c5b3ebeaa0412e28096bb0701434c51c1fbf76" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "47059d71b42d74b0a1e9f61c1d99d301039c3b5b" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" }, "mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" }, "mcphub.nvim": { "branch": "main", "commit": "7cd5db330f41b7bae02b2d6202218a061c3ebc1f" }, "mdx.nvim": { "branch": "main", "commit": "6c3dc7c4a4b58b5d86404c21a9b4655282ca08c5" }, "multicursors.nvim": { "branch": "main", "commit": "72225ea9e4443c3f4b9df91d0193e07c4ee8d382" }, "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, - "neogit": { "branch": "master", "commit": "5d1b65d6215928e941e1a6a4e76e02fd45ada31f" }, - "neotest": { "branch": "master", "commit": "ad991822b7076b1d940b33a9d6d0d30416d5df81" }, + "neogit": { "branch": "master", "commit": "43ea1a0854052e583f647e0b35879f0158a70a78" }, + "neotest": { "branch": "master", "commit": "fb84d87285698f7055f618083c351984449119b8" }, "neotest-plenary": { "branch": "master", "commit": "3523adcf9ffaad1911960c5813b0136c1b63a2ec" }, - "neotest-python": { "branch": "master", "commit": "e6df4f1892f6137f58135917db24d1655937d831" }, + "neotest-python": { "branch": "master", "commit": "51c453d57f8d5156671b42ea57fafa2e1c9fb641" }, "neotest-vim-test": { "branch": "master", "commit": "75c4228882ae4883b11bfce9b8383e637eb44192" }, "nightfly": { "branch": "master", "commit": "66050453bf40ac7eddc7a84dd15291db85fefc43" }, "nvim-code-action-menu": { "branch": "main", "commit": "8c7672a4b04d3cc4edd2c484d05b660a9cb34a1b" }, - "nvim-dap": { "branch": "master", "commit": "531771530d4f82ad2d21e436e3cc052d68d7aebb" }, + "nvim-dap": { "branch": "master", "commit": "9e848e09a697ee95302a3ef2dd43fd6eb709e570" }, "nvim-dap-lldb": { "branch": "main", "commit": "1f531bac2896b3d9ceb098b277c419c811f4609d" }, "nvim-dap-python": { "branch": "master", "commit": "1808458eba2b18f178f990e01376941a42c7f93b" }, "nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" }, - "nvim-lspconfig": { "branch": "master", "commit": "a683e0ddf0cf64c6cd689e18ffb480ade3c162b7" }, + "nvim-lspconfig": { "branch": "master", "commit": "d224a1920728ba129880efc700d4a0180ac4ecbb" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" }, "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, - "nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" }, - "obsidian.nvim": { "branch": "main", "commit": "2a8af7bd141123c7911fd0956ad986f29fe5bf12" }, + "nvim-web-devicons": { "branch": "master", "commit": "dad71387de386a946b123079d0e53f23028f3abd" }, + "obsidian.nvim": { "branch": "main", "commit": "4bf07e502c4e35425a0bfc3438232a10971c1355" }, "oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" }, "op.nvim": { "branch": "master", "commit": "563d651a73452f65690d5f05dd0882768844d2ae" }, "openingh.nvim": { "branch": "main", "commit": "7cc8c897cb6b34d8ed28e99d95baccef609ed251" }, @@ -64,7 +65,7 @@ "pomo.nvim": { "branch": "main", "commit": "7e06e5221d8d1e596a0ab29dd4d7fcee5f3cd05a" }, "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, - "schemastore.nvim": { "branch": "main", "commit": "735540a7602bffd1b07deab7d508affb57b78c64" }, + "schemastore.nvim": { "branch": "main", "commit": "6ff1f21b2e2b77ec59f7433ce2d9fbc052d908ac" }, "suda.vim": { "branch": "master", "commit": "c492741b4679b3cdd4d9e34138209784e061d916" }, "tcomment_vim": { "branch": "master", "commit": "48ab639a461d9b8344f7fee06cb69b4374863b13" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" }, @@ -78,12 +79,12 @@ "treesitter-modules.nvim": { "branch": "main", "commit": "290eec96bfc43ed28264661dd30e894a60c4b99c" }, "uiua.vim": { "branch": "main", "commit": "b6b5651d60b96825f60c9d598a39d1eae1069e45" }, "undotree": { "branch": "master", "commit": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d" }, - "unison": { "branch": "trunk", "commit": "1103dc9b0a37f756e664dfec9209fcb4c5391904" }, + "unison": { "branch": "trunk", "commit": "e1870038739ffcb27b4e3b483dafd2c21f6541b2" }, "vim-autoclose": { "branch": "master", "commit": "a9a3b7384657bc1f60a963fd6c08c63fc48d61c3" }, "vim-dadbod": { "branch": "master", "commit": "6d1d41da4873a445c5605f2005ad2c68c99d8770" }, "vim-dispatch": { "branch": "master", "commit": "a2ff28abdb2d89725192db5b8562977d392a4d3f" }, "vim-endwise": { "branch": "master", "commit": "4994afb0cdf956d9a665a14b9c834869e602c396" }, - "vim-matchup": { "branch": "master", "commit": "a2d618496223386844acb5a6763cfc3cc1357af1" }, + "vim-matchup": { "branch": "master", "commit": "055881643e1b37038a572c883de7b1969716db77" }, "vim-rest-console": { "branch": "master", "commit": "7b407f47185468d1b57a8bd71cdd66c9a99359b2" }, "vim-rhubarb": { "branch": "master", "commit": "5496d7c94581c4c9ad7430357449bb57fc59f501" }, "vim-sensible": { "branch": "master", "commit": "0ce2d843d6f588bb0c8c7eec6449171615dc56d9" }, diff --git a/roles/nvim/files/lua/plugins/spec/editor.lua b/roles/nvim/files/lua/plugins/spec/editor.lua index ff5e7b1..228c20f 100644 --- a/roles/nvim/files/lua/plugins/spec/editor.lua +++ b/roles/nvim/files/lua/plugins/spec/editor.lua @@ -91,7 +91,7 @@ return { -- order matters: if one is not detected, the other is used as fallback. You -- can also delete or rearangne the detection methods. detection_methods = { "pattern", "lsp" }, - patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn" }, + patterns = { ".git", "_darcs", ".hg", ".bzr", ".svn", ".jj" }, exclude_dirs = { "~/.cargo/*" }, show_hidden = true, diff --git a/roles/packages/tasks/arch.yml b/roles/packages/tasks/arch.yml index c236dd1..fe01fb3 100644 --- a/roles/packages/tasks/arch.yml +++ b/roles/packages/tasks/arch.yml @@ -17,3 +17,6 @@ - 1password - 1password-cli state: present + use: yay + become: true + become_user: "{{ dotfiles_user }}" diff --git a/roles/programming/tasks/arch.yml b/roles/programming/tasks/arch.yml index 6ef0e13..2220078 100644 --- a/roles/programming/tasks/arch.yml +++ b/roles/programming/tasks/arch.yml @@ -1,4 +1,7 @@ -- name: noop - debug: - msg: "noop" - when: false +- name: Install GitHub CLI + community.general.pacman: + name: github-cli + state: present + become: true + become_method: sudo + when: not ansible_check_mode diff --git a/roles/programming/tasks/debian.yml b/roles/programming/tasks/debian.yml index f23b682..d2d0512 100644 --- a/roles/programming/tasks/debian.yml +++ b/roles/programming/tasks/debian.yml @@ -65,3 +65,29 @@ become: true become_method: sudo when: not ansible_check_mode and snap_bin.stat.exists and go_snap_missing + +- name: Download GitHub CLI GPG key + get_url: + url: https://cli.github.com/packages/githubcli-archive-keyring.gpg + dest: /usr/share/keyrings/githubcli-archive-keyring.gpg + mode: "0644" + become: true + become_method: sudo + when: not ansible_check_mode + +- name: Add GitHub CLI apt repository + apt_repository: + repo: "deb [arch=amd64 signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" + state: present + filename: github-cli + become: true + become_method: sudo + when: not ansible_check_mode + +- name: Install GitHub CLI + apt: + name: gh + state: present + become: true + become_method: sudo + when: not ansible_check_mode diff --git a/roles/xinput/files/fix-touchpad.sh b/roles/xinput/files/fix-touchpad.sh old mode 100644 new mode 100755 index 26c9d94..6f85e21 --- a/roles/xinput/files/fix-touchpad.sh +++ b/roles/xinput/files/fix-touchpad.sh @@ -2,7 +2,7 @@ # Script to configure touchpad with natural scrolling and tapping enabled # Find touchpad device ID (looking for common touchpad names) -TOUCHPAD_ID=$(xinput list | grep -i 'touchpad\|synaptics\|elan' | grep -v 'Virtual' | head -1 | grep -oP 'id=\K\d+') +TOUCHPAD_ID=$(xinput list | grep -i 'touchpad\|synaptics\|elan' | grep -vi 'trackpoint\|tpps' | grep -v 'Virtual' | head -1 | grep -oP 'id=\K\d+') if [ -z "$TOUCHPAD_ID" ]; then echo "Error: Could not find touchpad device" diff --git a/roles/xinput/tasks/main.yml b/roles/xinput/tasks/main.yml index 2f889b1..d093261 100644 --- a/roles/xinput/tasks/main.yml +++ b/roles/xinput/tasks/main.yml @@ -10,3 +10,4 @@ dest: "{{ dotfiles_user_home }}/.local/bin/fix-touchpad" state: link force: true + mode: "0755" diff --git a/roles/zsh/files/zshrc.local b/roles/zsh/files/zshrc.local index 0d9e84b..8959b45 100644 --- a/roles/zsh/files/zshrc.local +++ b/roles/zsh/files/zshrc.local @@ -105,6 +105,7 @@ fi export SSH_AUTH_SOCK=~/.1password/agent.sock export TELEPORT_ADD_KEYS_TO_AGENT=no +export ELECTRON_OZONE_PLATFORM=x11 # The next line updates PATH for the Google Cloud SDK. if [ -f '/home/favilo/Downloads/google-cloud-sdk/path.zsh.inc' ]; then . '/home/favilo/Downloads/google-cloud-sdk/path.zsh.inc'; fi