From 35c5406f9c27cebd58b058fa815a13bd101bcf18 Mon Sep 17 00:00:00 2001 From: Stephen Brown II Date: Thu, 22 Apr 2021 08:20:17 -0600 Subject: [PATCH] Add personal changes Include dockutil: https://github.com/geerlingguy/mac-dev-playbook/pull/106 Include bootstrap from https://github.com/geerlingguy/mac-dev-playbook/pull/96#issuecomment-814314935 Use osx_defaults module: https://github.com/geerlingguy/mac-dev-playbook/pull/79 --- .github/FUNDING.yml | 3 +- .gitignore | 1 + README.md | 265 +++++++---- bootstrap.sh | 35 ++ default.config.yml | 69 ++- .../Packages/User/DashDoc.sublime-settings | 25 -- .../User/Package Control.sublime-settings | 23 - .../User/Preferences.sublime-settings | 37 -- inventory | 2 +- main.yml | 31 +- requirements.yml | 3 + tasks/dock-add.yml | 14 + tasks/dock-rm.yml | 14 + tasks/dock.yml | 23 + tasks/extra-packages.yml | 8 +- tasks/osx.yml | 12 + tasks/terminal.yml | 2 +- tasks/vscode.yml | 6 + vars/dock-items.yml | 34 ++ vars/homebrew-cask-apps.yml | 47 ++ vars/homebrew-installed-packages.yml | 72 +++ vars/osx-defaults.yml | 424 ++++++++++++++++++ vars/vscode-extensions.yml | 37 ++ 23 files changed, 952 insertions(+), 235 deletions(-) create mode 100644 bootstrap.sh delete mode 100644 files/sublime/Library/Packages/User/DashDoc.sublime-settings delete mode 100644 files/sublime/Library/Packages/User/Package Control.sublime-settings delete mode 100644 files/sublime/Library/Packages/User/Preferences.sublime-settings create mode 100644 tasks/dock-add.yml create mode 100644 tasks/dock-rm.yml create mode 100644 tasks/dock.yml create mode 100644 tasks/vscode.yml create mode 100644 vars/dock-items.yml create mode 100644 vars/homebrew-cask-apps.yml create mode 100644 vars/homebrew-installed-packages.yml create mode 100644 vars/osx-defaults.yml create mode 100644 vars/vscode-extensions.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 96b493831..481a7dd32 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,4 +1,3 @@ # These are supported funding model platforms --- -github: geerlingguy -patreon: geerlingguy +github: StephenBrown2 diff --git a/.gitignore b/.gitignore index a97f7a52f..709daf704 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ .DS_Store *.retry roles* +.cache config.yml diff --git a/README.md b/README.md index a7126e4d5..78859588f 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,29 @@ -Mac Dev Playbook Logo - # Mac Development Ansible Playbook +![Mac Dev Playbook Logo](/files/Mac-Dev-Playbook-Logo.png) + [![CI][badge-gh-actions]][link-gh-actions] +This work is inspired by [geerlingguy](https://github.com/geerlingguy/mac-dev-playbook)'s work on automating the setup for my MacBook. + This playbook installs and configures most of the software I use on my Mac for web and software development. Some things in macOS are slightly difficult to automate, so I still have some manual installation steps, but at least it's all documented here. This is a work in progress, and is mostly a means for me to document my current Mac's setup. I'll be evolving this playbook over time. *See also*: - - [Boxen](https://github.com/boxen) - - [Battleschool](http://spencer.gibb.us/blog/2014/02/03/introducing-battleschool) - - [osxc](https://github.com/osxc) - - [MWGriffin/ansible-playbooks](https://github.com/MWGriffin/ansible-playbooks) (the original inspiration for this project) +- [Boxen](https://github.com/boxen) +- [Battleschool](http://spencer.gibb.us/blog/2014/02/03/introducing-battleschool) +- [osxc](https://github.com/osxc) +- [MWGriffin/ansible-playbooks](https://github.com/MWGriffin/ansible-playbooks) (the original inspiration for geerlingguy's project) +- [geerlingguy/mac-dev-playbook](https://github.com/geerlingguy/mac-dev-playbook) (the original inspiration for this project) +- [NileshGule/Mac-dev-playbook](https://github.com/NileshGule/Mac-dev-playbook) ## Installation - 1. Ensure Apple's command line tools are installed (`xcode-select --install` to launch the installer). - 2. [Install Ansible](https://docs.ansible.com/ansible/latest/installation_guide/index.html). - 3. Clone this repository to your local drive. - 4. Run `$ ansible-galaxy install -r requirements.yml` inside this directory to install required Ansible roles. - 5. Run `ansible-playbook main.yml -i inventory --ask-become-pass` inside this directory. Enter your account password when prompted. +1. Clone this repository to your local drive. +2. Source [`bootstrap.sh`](bootstrap.sh) +3. Run `$ mac::setup` > Note: If some Homebrew commands fail, you might need to agree to Xcode's license or fix some other Brew issue. Run `brew doctor` to see if this is the case. @@ -29,16 +31,18 @@ This is a work in progress, and is mostly a means for me to document my current You can use this playbook to manage other Macs as well; the playbook doesn't even need to be run from a Mac at all! If you want to manage a remote Mac, either another Mac on your network, or a hosted Mac like the ones from [MacStadium](https://www.macstadium.com), you just need to make sure you can connect to it with SSH: - 1. (On the Mac you want to connect to:) Go to System Preferences > Sharing. - 2. Enable 'Remote Login'. +1. (On the Mac you want to connect to:) Go to System Preferences > Sharing. +2. Enable 'Remote Login'. > You can also enable remote login on the command line: > -> sudo systemsetup -setremotelogin on +> ```sh +> sudo systemsetup -setremotelogin on +> ``` Then edit the `inventory` file in this repository and change the line that starts with `127.0.0.1` to: -``` +```ini [ip address or hostname of mac] ansible_user=[mac ssh username] ``` @@ -46,9 +50,11 @@ If you need to supply an SSH password (if you don't use SSH keys), make sure to ### Running a specific set of tagged tasks -You can filter which part of the provisioning process to run by specifying a set of tags using `ansible-playbook`'s `--tags` flag. The tags available are `dotfiles`, `homebrew`, `mas`, `extra-packages` and `osx`. +You can filter which part of the provisioning process to run by specifying a set of tags using `ansible-playbook`'s `--tags` flag. The tags available are `dotfiles`, `homebrew`, `mas`, `extra-packages`, `vscode`, `dock`, and `osx`. - ansible-playbook main.yml -i inventory -K --tags "dotfiles,homebrew" +```sh +ansible-playbook main.yml -i inventory -K --tags "dotfiles,homebrew" +``` ## Overriding Defaults @@ -56,31 +62,33 @@ Not everyone's development environment and preferred software configuration is t You can override any of the defaults configured in `default.config.yml` by creating a `config.yml` file and setting the overrides in that file. For example, you can customize the installed packages and apps with something like: - homebrew_installed_packages: - - cowsay - - git - - go - - mas_installed_apps: - - { id: 443987910, name: "1Password" } - - { id: 498486288, name: "Quick Resizer" } - - { id: 557168941, name: "Tweetbot" } - - { id: 497799835, name: "Xcode" } - - composer_packages: - - name: hirak/prestissimo - - name: drush/drush - version: '^8.1' - - gem_packages: - - name: bundler - state: latest - - npm_packages: - - name: webpack - - pip_packages: - - name: mkdocs +```yaml +homebrew_installed_packages: + - cowsay + - git + - go + +mas_installed_apps: + - { id: 443987910, name: "1Password" } + - { id: 498486288, name: "Quick Resizer" } + - { id: 557168941, name: "Tweetbot" } + - { id: 497799835, name: "Xcode" } + +composer_packages: + - name: hirak/prestissimo + - name: drush/drush + version: '^8.1' + +gem_packages: + - name: bundler + state: latest + +npm_packages: + - name: webpack + +pip_packages: + - name: mkdocs +``` Any variable can be overridden in `config.yml`; see the supporting roles' documentation for a complete list of available variables. @@ -88,51 +96,124 @@ Any variable can be overridden in `config.yml`; see the supporting roles' docume Applications (installed with Homebrew Cask): - - [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/) - - [Docker](https://www.docker.com/) - - [Dropbox](https://www.dropbox.com/) - - [Firefox](https://www.mozilla.org/en-US/firefox/new/) - - [Google Chrome](https://www.google.com/chrome/) - - [Handbrake](https://handbrake.fr/) - - [Homebrew](http://brew.sh/) - - [LICEcap](http://www.cockos.com/licecap/) - - [LimeChat](http://limechat.net/mac/) - - [MacVim](http://macvim-dev.github.io/macvim/) - - [nvALT](http://brettterpstra.com/projects/nvalt/) - - [Sequel Pro](https://www.sequelpro.com/) (MySQL client) - - [Skitch](https://evernote.com/skitch/) - - [Slack](https://slack.com/) - - [Sublime Text](https://www.sublimetext.com/) - - [Transmit](https://panic.com/transmit/) (S/FTP client) - - [Vagrant](https://www.vagrantup.com/) +- android-messages # Desktop client for Android Messages +- android-studio # Tools for building Android applications +- appgate-sdp-client # Software-defined perimeter for secure network access +- balance-lock # Keep your Mac audio centred +- balenaetcher # Tool to flash OS images to SD cards & USB drives +- cheatsheet # Tool to list all active shortcuts of the current application +- day-o # A simple menu bar clock replacement +- dbeaver-community # Free universal database tool and SQL client +- discord # Voice and text chat software +- disk-inventory-x # Disk usage utility +- docker # App to build and share containerized applications and microservices +- dozer # Tool to hide status bar icons +- dupeguru # Finds duplicate files in a computer system +- firefox-developer-edition # Web browser +- font-fantasque-sans-mono # Fantasque Sans Mono +- font-firacode-nerd-font # FiraCode Nerd Font (Fira Code) +- font-hack-nerd-font # Hack Nerd Font (Hack) +- font-ia-writer-mono # iA Writer Mono +- freemind # Mind-mapping software written in Java +- gitkraken # Git client focusing on productivity +- google-backup-and-sync # Access and sync your Google Drive content +- google-chrome # Web browser +- gramps # Genealogy software +- iina # Free and open-source media player +- insomnia # HTTP and GraphQL Client +- iterm2-beta # Terminal emulator as alternative to Apple's Terminal app +- licecap # Animated screen capture application +- meld # Visual diff and merge tool +- muzzle # Silence embarrassing notifications while screensharing +- rectangle # Move and resize windows using keyboard shortcuts or snap areas +- robo-3t # MongoDB management tool +- session-manager-plugin # Plugin for AWS CLI to start and end sessions that connect to managed instances +- signal-beta # Instant messaging application focusing on security +- slack # Team communication and collaboration software +- the-unarchiver # Unpacks archive files +- tunnelblick # Free and open-source OpenVPN client +- vagrant # Development environment +- virtualbox # Free and open-source hosted hypervisor for x86 virtualization +- visual-studio-code # Open-source code editor +- wkhtmltopdf # open source (LGPLv3) command line tool to render HTML into PDF +- wombat # Cross platform gRPC client +- yubico-yubikey-manager # Cross-platform application for configuring any YubiKey over all USB interfaces +- zenmap # Multi-platform graphical interface for official Nmap Security Scanner +- zoom # Video communication and virtual meeting platform +- zoom-outlook-plugin # Outlook Plugin for Zoom.us Packages (installed with Homebrew): - - autoconf - - bash-completion - - doxygen - - gettext - - gifsicle - - git - - go - - gpg - - hub - - httpie - - iperf - - libevent - - sqlite - - mcrypt - - nmap - - node - - nvm - - php - - ssh-copy-id - - cowsay - - readline - - openssl - - pv - - wget - - wrk +- ansible # Automate deployment, configuration, and upgrading +- ansible-lint # Checks ansible playbooks for practices and behaviour +- bat # Clone of cat(1) with syntax highlighting and Git integration +- bitwarden-cli # Secure and free password manager for all of your devices +- broot # New way to see and navigate directory trees +- caddy # Powerful, enterprise-ready, open source web server with automatic HTTPS +- cowsay # Configurable talking characters in ASCII art +- curl # Get a file from an HTTP, HTTPS or FTP server +- dive # A tool for exploring each layer in a docker image +- docker-compose # Isolated development environments using Docker +- ericm/stonks/stonks # A terminal based stock visualizer and tracker. +- exa # Modern replacement for 'ls' +- fd # Simple, fast and user-friendly alternative to find +- gh # GitHub command-line tool +- git # Distributed revision control system +- git-extras # Small git utilities +- go # Open source programming language to build simple/reliable/efficient software +- gobuffalo/tap/buffalo # Rapid Web Development w/ Go +- gofumpt # Stricter gofmt +- graphviz # Graph visualization software from AT&T and Bell Labs +- helm # Kubernetes package manager +- homeassistant-cli # Command-line utility for Home Assistant +- httpie # User-friendly cURL replacement (command-line HTTP client) +- hugo # Configurable static site generator +- jawshooah/pyenv/pyenv-default-packages # Automatically install packages in python environments +- jq # Lightweight and flexible command-line JSON processor +- kubectx # Tool that can switch between kubectl contexts easily and create aliases +- lazydocker # Lazier way to manage everything docker +- molecule # Automated testing for Ansible roles +- moreutils # Collection of tools that nobody wrote when UNIX was young +- mosh # Remote terminal application +- muffet # Fast website link checker in Go +- multitail # Tail multiple files in one terminal simultaneously +- node # Platform built on V8 to build network applications +- nvm # Manage multiple Node.js versions +- openssl # Cryptography and SSL/TLS Toolkit +- pandoc # Swiss-army knife of markup format conversion +- pgcli # CLI for Postgres with auto-completion and syntax highlighting +- pipx # Execute binaries from Python packages in isolated environments +- poetry # Python package management tool +- pre-commit # Framework for managing multi-language pre-commit hooks +- pv # Monitor data's progress through a pipe +- pyenv-ccache # Make Python build faster, using the leverage of `ccache` +- pyenv-pip-migrate # Migrate pip packages from one Python version to another +- qrencode # QR Code generation +- rclone # Rsync for cloud storage +- ripgrep # Search tool like grep and The Silver Searcher +- rust # Safe, concurrent, practical language +- shellcheck # Static analysis and lint tool, for (ba)sh scripts +- shihanng/gig/gig # gitignore file generator +- sl # Prints a steam locomotive if you type sl instead of ls +- sqlite # Command-line interface for SQLite +- ssh-copy-id # Add a public key to a remote machine's authorized_keys file +- starship # Cross-shell prompt for astronauts +- stoken # Tokencode generator compatible with RSA SecurID 128-bit (AES) +- tealdeer # Very fast implementation of tldr in Rust +- tlk/imagemagick-x11/imagemagick # Tools and libraries to manipulate images in many formats (X11 support) +- tokei # Program that allows you to count code, quickly +- tox # Generic Python virtualenv management and test command-line tool +- tree # Display directories as trees (with optional color/HTML output) +- watch # Executes a program periodically, showing output fullscreen +- wget # Internet file retriever +- wireguard-tools # Tools for the WireGuard secure network tunnel +- wrk # HTTP benchmarking tool +- yadm # Yet Another Dotfiles Manager +- yarn # JavaScript package manager +- youtube-dl # Download YouTube videos from the command-line +- yq # Process YAML documents from the CLI +- zsh # UNIX shell (command interpreter) +- zsh-history-substring-search # Zsh port of Fish shell's history search My [dotfiles](https://github.com/geerlingguy/dotfiles) are also installed into the current user's home directory, including the `.osx` dotfile for configuring many aspects of macOS for better performance and ease of use. You can disable dotfiles management by setting `configure_dotfiles: no` in your configuration. @@ -144,16 +225,16 @@ Finally, there are a few other preferences and settings added on for various app It's my hope that I can get the rest of these things wrapped up into Ansible playbooks soon, but for now, these steps need to be completed manually (assuming you already have Xcode and Ansible installed, and have run this playbook). - 1. Install [Sublime Package Manager](http://sublime.wbond.net/installation). - 2. Remap Caps Lock to Escape (requires macOS Sierra 10.12.1+). - 3. Set trackpad tracking rate. - 4. Set mouse tracking rate. - 5. Configure extra Mail and/or Calendar accounts (e.g. Google, Exchange, etc.). +1. Remap Caps Lock to Escape (requires macOS Sierra 10.12.1+). +2. Set trackpad tracking rate. +3. Set mouse tracking rate. +4. Configure extra Mail and/or Calendar accounts (e.g. Google, Exchange, etc.). -### Configuration to be added: +### Configuration to be added - - I have vim configuration in the repo, but I still need to add the actual installation: - ``` +- I have vim configuration in the repo, but I still need to add the actual installation: + + ```sh mkdir -p ~/.vim/autoload mkdir -p ~/.vim/bundle cd ~/.vim/autoload diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100644 index 000000000..a20402ff7 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +#set -eoup + +function mac::ensure-upstream() { + if [ ! -d mac-dev-playbook ]; then + git clone https://github.com/geerlingguy/mac-dev-playbook + cd mac-dev-playbook + git remote rename origin upstream + else + cd mac-dev-playbook + git fetch --all + git rebase upstream master + cd - + fi +} + +function mac::ensure-dependencies() { + xcode-select --install || true + /usr/bin/env bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + brew install ansible mas + ansible-galaxy install -r requirements.yml +} + +function mac::apply() { + # cd mac-dev-playbook + # [ ! -f config.yml ] && ln -s ../config.yml . + ansible-playbook main.yml -i inventory --ask-become-pass +} + +function mac::setup() { + mac::ensure-dependencies + # mac::ensure-upstream + mac::apply +} diff --git a/default.config.yml b/default.config.yml index 8293cc714..ce1348379 100644 --- a/default.config.yml +++ b/default.config.yml @@ -1,17 +1,21 @@ --- downloads: ~/.ansible-downloads/ -configure_dotfiles: true -configure_terminal: true +configure_dock: true +configure_dotfiles: false configure_osx: true - configure_sudoers: false +configure_terminal: true + sudoers_custom_config: '' # Example: # sudoers_custom_config: | # # Allow users in admin group to use sudo with no password. # %admin ALL=(ALL) NOPASSWD: ALL +dockitems_to_remove: [] +dockitems_to_persist: [] + dotfiles_repo: https://github.com/geerlingguy/dotfiles.git dotfiles_repo_accept_hostkey: true dotfiles_repo_local_destination: ~/Development/GitHub/dotfiles @@ -22,53 +26,25 @@ dotfiles_files: - .osx - .vimrc -homebrew_installed_packages: - # - ansible # Installed via Pip. - - autoconf - - bash-completion - - doxygen - - gettext - - gifsicle - - git - - github/gh/gh - - go - - gpg - - httpie - - iperf - - libevent - - sqlite - - mcrypt - - nmap - - node - - nvm - - php - - ssh-copy-id - - cowsay - - readline - - openssl - - pv - - wget - - wrk - - zsh-history-substring-search +homebrew_installed_packages: [] homebrew_taps: - homebrew/core + - homebrew/bundle - homebrew/cask + - homebrew/cask-drivers + - homebrew/cask-fonts + - homebrew/cask-versions + - homebrew/command-not-found + - homebrew/services + - ericm/stonks + - gobuffalo/tap + - jawshooah/pyenv + - shihanng/gig + - tlk/imagemagick-x11 homebrew_cask_appdir: /Applications -homebrew_cask_apps: - - chromedriver - - docker - - dropbox - - firefox - - google-chrome - - handbrake - - licecap - - sequel-pro - - slack - - sublime-text - - transmit - - vagrant +homebrew_cask_apps: [] # See `geerlingguy.mas` role documentation for usage instructions. mas_installed_apps: [] @@ -76,6 +52,11 @@ mas_email: "" mas_password: "" osx_script: "~/.osx --no-restart" +osx_use_dotfile: false +osx_use_defaults: true +osx_defaults: [] + +vscode_extensions: [] # Install packages from other package managers. # Note: You are responsible for making sure the required package managers are diff --git a/files/sublime/Library/Packages/User/DashDoc.sublime-settings b/files/sublime/Library/Packages/User/DashDoc.sublime-settings deleted file mode 100644 index d7a97fc2a..000000000 --- a/files/sublime/Library/Packages/User/DashDoc.sublime-settings +++ /dev/null @@ -1,25 +0,0 @@ -{ - "syntax_sensitive_as_default": true, - "syntax_docset_map": - { - "CSS" : ["css", "bootstrap", "foundation", "less", "cordova", "phonegap"], - "Go" : ["go"], - "GoSublime" : ["go"], - "GoSublime-Go" : ["go"], - "HTML" : ["php", "html"], - "Java" : ["java", "javafx", "grails", "groovy", "playjava", "spring", "cvj", "processing"], - "JavaScript" : ["javascript", "jquery", "jqueryui", "jquerym", "backbone", "marionette", "meteor", "sproutcore", "moo", "prototype", "bootstrap", "foundation", "lodash", "underscore", "ember", "sencha", "extjs", "knockout", "zepto", "yui", "d3", "svg", "dojo", "coffee", "nodejs", "express", "mongoose", "grunt", "chai", "html", "css", "cordova", "phonegap", "unity3d", "titanium"], - "Markdown" : ["markdown"], - "Objective-C" : ["iphoneos", "macosx", "appledoc", "cocos2d", "cocos3d", "kobold2d", "sparrow", "c", "manpages"], - "PHP" : ["drupal", "php", "drupal", "symfony", "twig", "html", "mysql"], - "Puppet" : ["puppet"], - "Python" : ["python", "django", "twisted", "sphinx", "flask", "cvp"], - "Ruby" : ["ruby", "rubygems", "rails"], - "Ruby on Rails" : ["ruby", "rubygems", "rails"], - "Sass" : ["sass", "compass", "bourbon", "neat", "css"], - "Shell-Unix-Generic" : ["bash", "manpages"], - "SQL" : ["mysql", "sqlite", "psql"], - "TCL" : ["tcl"], - "YAML" : ["ansible", "yaml", "drupal"], - } -} diff --git a/files/sublime/Library/Packages/User/Package Control.sublime-settings b/files/sublime/Library/Packages/User/Package Control.sublime-settings deleted file mode 100644 index a0de2f98e..000000000 --- a/files/sublime/Library/Packages/User/Package Control.sublime-settings +++ /dev/null @@ -1,23 +0,0 @@ -{ - "auto_upgrade_last_run": null, - "installed_packages": - [ - "DashDoc", - "DocBlockr", - "Dockerfile Syntax Highlighting", - "Drupal Snippets", - "FileDiffs", - "GitHub Flavored Markdown Preview", - "Jinja2", - "MarkAndMove", - "Markdown Preview", - "Package Control", - "Puppet", - "RegReplace", - "Sass", - "SublimeCodeIntel", - "SublimeLinter", - "TrailingSpaces", - "Xdebug Client" - ] -} diff --git a/files/sublime/Library/Packages/User/Preferences.sublime-settings b/files/sublime/Library/Packages/User/Preferences.sublime-settings deleted file mode 100644 index 812fd296a..000000000 --- a/files/sublime/Library/Packages/User/Preferences.sublime-settings +++ /dev/null @@ -1,37 +0,0 @@ -{ - "color_scheme": "Packages/Color Scheme - Default/Cobalt.tmTheme", - "font_size": 12.0, - "ignored_packages": - [ - "Vintage" - ], - "rulers": - [ - 80 - ], - "line_numbers": true, - "gutter": true, - "margin": 4, - "fold_buttons": true, - "fade_fold_buttons": true, - "spell_check": false, - "tab_size": 2, - "translate_tabs_to_spaces": true, - "detect_indentation": true, - "auto_indent": true, - "smart_indent": true, - "trim_automatic_white_space": false, - "auto_match_enabled": true, - "draw_minimap_border": false, - "highlight_line": true, - "match_brackets": true, - "match_selection": true, - "draw_white_space": "selection", - "trim_trailing_white_space_on_save": false, - "ensure_newline_at_eof_on_save": false, - "folder_exclude_patterns": ["node_modules", ".svn", ".git", ".hg", "CVS", "vendor", ".bundle", ".vagrant"], - "file_exclude_patterns": ["*.pyc", "*.pyo", "*.exe", "*.dll", "*.obj","*.o", "*.a", "*.lib", "*.so", "*.dylib", "*.ncb", "*.sdf", "*.suo", "*.pdb", "*.idb", ".DS_Store", "*.class", "*.psd", "*.db", "*.sublime-workspace"], - "binary_file_patterns": ["generated/*", "*.tbz2", "*.gzip", "*.jpg", "*.jpeg", "*.png", "*.gif", "*.ttf", "*.tga", "*.dds", "*.ico", "*.eot", "*.pdf", "*.swf", "*.jar", "*.zip"] - "auto_complete": false, - "auto_complete_commit_on_tab": true, -} diff --git a/inventory b/inventory index 5b7201063..458e04dde 100644 --- a/inventory +++ b/inventory @@ -1,2 +1,2 @@ [all] -127.0.0.1 ansible_connection=local +localhost ansible_connection=local diff --git a/main.yml b/main.yml index b35b077bd..006db6f14 100644 --- a/main.yml +++ b/main.yml @@ -3,6 +3,11 @@ vars_files: - default.config.yml + - vars/dock-items.yml + - vars/homebrew-cask-apps.yml + - vars/homebrew-installed-packages.yml + - vars/osx-defaults.yml + - vars/vscode-extensions.yml pre_tasks: - name: Include playbook configuration. @@ -22,23 +27,37 @@ tags: ['mas'] tasks: - - include_tasks: tasks/ansible-setup.yml + - name: Set up Ansible + ansible.builtin.include_tasks: tasks/ansible-setup.yml - - include_tasks: tasks/sudoers.yml + - name: Configure Sudoers + ansible.builtin.include_tasks: tasks/sudoers.yml when: configure_sudoers - - include_tasks: tasks/terminal.yml + - name: Configure Terminal + ansible.builtin.include_tasks: tasks/terminal.yml when: configure_terminal - - include_tasks: tasks/osx.yml + - name: Configure OSX + ansible.builtin.include_tasks: tasks/osx.yml when: configure_osx tags: ['osx'] - - include_tasks: tasks/extra-packages.yml + - name: Install extra packages + ansible.builtin.include_tasks: tasks/extra-packages.yml tags: ['extra-packages'] + - name: Install VSCode extensions + ansible.builtin.include_tasks: tasks/vscode.yml + tags: ['vscode'] + + - name: Configure dock items + ansible.builtin.include_tasks: tasks/dock.yml + when: configure_dock + tags: ['dock'] + - name: Run configured post-provision ansible task files. - include_tasks: "{{ outer_item }}" + ansible.builtin.include_tasks: "{{ outer_item }}" loop_control: loop_var: outer_item with_fileglob: "{{ post_provision_tasks|default(omit) }}" diff --git a/requirements.yml b/requirements.yml index 859e6952a..d6ec0fff9 100644 --- a/requirements.yml +++ b/requirements.yml @@ -3,3 +3,6 @@ roles: - name: geerlingguy.dotfiles - name: geerlingguy.homebrew - name: geerlingguy.mas + +collections: +- name: community.general diff --git a/tasks/dock-add.yml b/tasks/dock-add.yml new file mode 100644 index 000000000..f85bdab9a --- /dev/null +++ b/tasks/dock-add.yml @@ -0,0 +1,14 @@ +--- +- name: find if {{ item }} in dock + ansible.builtin.command: + cmd: dockutil --find '{{ item.name }}' + register: dockitem_exists + changed_when: false + failed_when: '"No such file or directory" in dockitem_exists.stdout' + tags: ['dock'] + +- name: Add {{ item }} to dock + ansible.builtin.command: + cmd: dockutil --add '{{ item.path }}' + when: dockitem_exists.rc > 0 + tags: ['dock'] diff --git a/tasks/dock-rm.yml b/tasks/dock-rm.yml new file mode 100644 index 000000000..bc3893926 --- /dev/null +++ b/tasks/dock-rm.yml @@ -0,0 +1,14 @@ +--- +- name: Find if {{ item }} in dock + ansible.builtin.command: + cmd: dockutil --find '{{ item }}' + register: dockitem_exists + changed_when: false + failed_when: '"No such file or directory" in dockitem_exists.stdout' + tags: ['dock'] + +- name: Remove {{ item }} from dock + ansible.builtin.command: + cmd: dockutil --remove '{{ item }}' + when: dockitem_exists.rc == 0 + tags: ['dock'] diff --git a/tasks/dock.yml b/tasks/dock.yml new file mode 100644 index 000000000..3ca1d709f --- /dev/null +++ b/tasks/dock.yml @@ -0,0 +1,23 @@ +--- +- name: Install dockutil + homebrew: + name: dockutil + state: present + notify: + - Clear homebrew cache + +- name: Remove unwanted dock items + ansible.builtin.include_tasks: tasks/dock-rm.yml + loop: "{{ dockitems_to_remove }}" + +- name: Ensure required dock items exist + ansible.builtin.include_tasks: tasks/dock-add.yml + loop: "{{ dockitems_to_persist }}" + +- name: Ensure correct dock order + ansible.builtin.command: + cmd: dockutil --move '{{ item.name }}' --position {{ item.position }} + when: + - item.position is defined + - item.position > 0 + loop: "{{ dockitems_to_persist }}" diff --git a/tasks/extra-packages.yml b/tasks/extra-packages.yml index 643cd41f1..677148ba9 100644 --- a/tasks/extra-packages.yml +++ b/tasks/extra-packages.yml @@ -5,7 +5,7 @@ arguments: "{{ item.name | default(item) }} {{ item.version | default('@stable') }}" # Ansible 2.4 supports `global_command` making `working_dir` optional. working_dir: "{{ lookup('env', 'COMPOSER_HOME') | default('~/.composer', true) }}" - with_items: "{{ composer_packages }}" + loop: "{{ composer_packages }}" - name: Install global NPM packages. npm: @@ -14,7 +14,7 @@ version: "{{ item.version | default(omit) }}" global: true executable: "{{ item.executable | default(omit) }}" - with_items: "{{ npm_packages }}" + loop: "{{ npm_packages }}" - name: Install global Pip packages. pip: @@ -22,7 +22,7 @@ state: "{{ item.state | default('present') }}" version: "{{ item.version | default(omit) }}" executable: "{{ item.executable | default(omit) }}" - with_items: "{{ pip_packages }}" + loop: "{{ pip_packages }}" - name: Install global Ruby gems. gem: @@ -31,4 +31,4 @@ version: "{{ item.version | default(omit) }}" user_install: false executable: "{{ item.executable | default(omit) }}" - with_items: "{{ gem_packages }}" + loop: "{{ gem_packages }}" diff --git a/tasks/osx.yml b/tasks/osx.yml index ec12cd524..a5733df82 100644 --- a/tasks/osx.yml +++ b/tasks/osx.yml @@ -1,5 +1,17 @@ --- +- name: Run macOS defaults. + community.general.osx_defaults: + domain: "{{ item.domain }}" + key: "{{ item.key }}" + type: "{{ item.type }}" + value: "{{ item.value }}" + state: "{{ item.state | default('present') }}" + become: "{{ item.become | default('no') | bool }}" + loop: "{{ osx_defaults }}" + when: osx_use_defaults + # TODO: Use sudo once .osx can be run via root with no user interaction. - name: Run .osx dotfiles. command: "{{ osx_script }}" changed_when: false + when: osx_use_dotfile diff --git a/tasks/terminal.yml b/tasks/terminal.yml index 3807ab63c..352ed2759 100644 --- a/tasks/terminal.yml +++ b/tasks/terminal.yml @@ -14,7 +14,7 @@ # TODO: This doesn't work in Yosemite. Consider a different solution? - name: Ensure custom Terminal profile is set as default. command: "{{ item }}" - with_items: + loop: - defaults write com.apple.terminal 'Default Window Settings' -string JJG-Term - defaults write com.apple.terminal 'Startup Window Settings' -string JJG-Term changed_when: false diff --git a/tasks/vscode.yml b/tasks/vscode.yml new file mode 100644 index 000000000..3cd7d6485 --- /dev/null +++ b/tasks/vscode.yml @@ -0,0 +1,6 @@ +--- +- name: "Install VS Code extensions" + command: "code --install-extension '{{ item }}'" + loop: "{{ vscode_extensions }}" + register: vscode_result + changed_when: "'already installed' not in vscode_result.stdout" diff --git a/vars/dock-items.yml b/vars/dock-items.yml new file mode 100644 index 000000000..b41190737 --- /dev/null +++ b/vars/dock-items.yml @@ -0,0 +1,34 @@ +--- +dockitems_to_remove: + - Launchpad + - Safari + - Messages + - Mail + - Maps + - Photos + - FaceTime + - Calendar + - Contacts + - Reminders + - Notes + - TV + - Music + - Podcasts + - 'App Store' + +dockitems_to_persist: + - name: iTerm + path: "/Applications/iTerm.app/" + position: 1 + - name: "Firefox Developer Edition" + path: "/Applications/Firefox Developer Edition.app/" + position: 2 + - name: "Slack" + path: "/Applications/Slack.app/" + position: 3 + - name: "GitKraken" + path: "/Applications/GitKraken.app/" + position: 4 + - name: "Visual Studio Code" + path: "/Applications/Visual Studio Code.app/" + position: 5 diff --git a/vars/homebrew-cask-apps.yml b/vars/homebrew-cask-apps.yml new file mode 100644 index 000000000..dc2995752 --- /dev/null +++ b/vars/homebrew-cask-apps.yml @@ -0,0 +1,47 @@ +--- +homebrew_cask_apps: + - android-messages # Desktop client for Android Messages + - android-studio # Tools for building Android applications + - appgate-sdp-client # Software-defined perimeter for secure network access + - balance-lock # Keep your Mac audio centred + - balenaetcher # Tool to flash OS images to SD cards & USB drives + - cheatsheet # Tool to list all active shortcuts of the current application + - day-o # A simple menu bar clock replacement + - dbeaver-community # Free universal database tool and SQL client + - discord # Voice and text chat software + - disk-inventory-x # Disk usage utility + - docker # App to build and share containerized applications and microservices + - dozer # Tool to hide status bar icons + - dupeguru # Finds duplicate files in a computer system + - firefox-developer-edition # Web browser + - font-fantasque-sans-mono # Fantasque Sans Mono + - font-firacode-nerd-font # FiraCode Nerd Font (Fira Code) + - font-hack-nerd-font # Hack Nerd Font (Hack) + - font-ia-writer-mono # iA Writer Mono + - freemind # Mind-mapping software written in Java + - gitkraken # Git client focusing on productivity + - google-backup-and-sync # Access and sync your Google Drive content + - google-chrome # Web browser + - gramps # Genealogy software + - iina # Free and open-source media player + - insomnia # HTTP and GraphQL Client + - iterm2-beta # Terminal emulator as alternative to Apple's Terminal app + - licecap # Animated screen capture application + - meld # Visual diff and merge tool + - muzzle # Silence embarrassing notifications while screensharing + - rectangle # Move and resize windows using keyboard shortcuts or snap areas + - robo-3t # MongoDB management tool + - session-manager-plugin # Plugin for AWS CLI to start and end sessions that connect to managed instances + - signal-beta # Instant messaging application focusing on security + - slack # Team communication and collaboration software + - the-unarchiver # Unpacks archive files + - tunnelblick # Free and open-source OpenVPN client + - vagrant # Development environment + - virtualbox # Free and open-source hosted hypervisor for x86 virtualization + - visual-studio-code # Open-source code editor + - wkhtmltopdf # open source (LGPLv3) command line tool to render HTML into PDF + - wombat # Cross platform gRPC client + - yubico-yubikey-manager # Cross-platform application for configuring any YubiKey over all USB interfaces + - zenmap # Multi-platform graphical interface for official Nmap Security Scanner + - zoom # Video communication and virtual meeting platform + - zoom-outlook-plugin # Outlook Plugin for Zoom.us diff --git a/vars/homebrew-installed-packages.yml b/vars/homebrew-installed-packages.yml new file mode 100644 index 000000000..1ab62cbdf --- /dev/null +++ b/vars/homebrew-installed-packages.yml @@ -0,0 +1,72 @@ +--- +homebrew_installed_packages: + - ansible # Automate deployment, configuration, and upgrading + - ansible-lint # Checks ansible playbooks for practices and behaviour + - bat # Clone of cat(1) with syntax highlighting and Git integration + - bitwarden-cli # Secure and free password manager for all of your devices + - broot # New way to see and navigate directory trees + - buffalo # Rapid Web Development w/ Go + - caddy # Powerful, enterprise-ready, open source web server with automatic HTTPS + - cowsay # Configurable talking characters in ASCII art + - curl # Get a file from an HTTP, HTTPS or FTP server + - dive # A tool for exploring each layer in a docker image + - docker-compose # Isolated development environments using Docker + - exa # Modern replacement for 'ls' + - fd # Simple, fast and user-friendly alternative to find + - gh # GitHub command-line tool + - git # Distributed revision control system + - git-extras # Small git utilities + - go # Open source programming language to build simple/reliable/efficient software + - gofumpt # Stricter gofmt + - graphviz # Graph visualization software from AT&T and Bell Labs + - helm # Kubernetes package manager + - homeassistant-cli # Command-line utility for Home Assistant + - httpie # User-friendly cURL replacement (command-line HTTP client) + - hugo # Configurable static site generator + - jq # Lightweight and flexible command-line JSON processor + - kubectx # Tool that can switch between kubectl contexts easily and create aliases + - lazydocker # Lazier way to manage everything docker + - molecule # Automated testing for Ansible roles + - moreutils # Collection of tools that nobody wrote when UNIX was young + - mosh # Remote terminal application + - muffet # Fast website link checker in Go + - multitail # Tail multiple files in one terminal simultaneously + - node # Platform built on V8 to build network applications + - nvm # Manage multiple Node.js versions + - openssl # Cryptography and SSL/TLS Toolkit + - pandoc # Swiss-army knife of markup format conversion + - pgcli # CLI for Postgres with auto-completion and syntax highlighting + - pipx # Execute binaries from Python packages in isolated environments + - poetry # Python package management tool + - pre-commit # Framework for managing multi-language pre-commit hooks + - pv # Monitor data's progress through a pipe + - pyenv-ccache # Make Python build faster, using the leverage of `ccache` + - pyenv-default-packages # Automatically install packages in python environments + - pyenv-pip-migrate # Migrate pip packages from one Python version to another + - qrencode # QR Code generation + - rclone # Rsync for cloud storage + - ripgrep # Search tool like grep and The Silver Searcher + - rust # Safe, concurrent, practical language + - shellcheck # Static analysis and lint tool, for (ba)sh scripts + - shihanng/gig/gig # gitignore file generator + - sl # Prints a steam locomotive if you type sl instead of ls + - sqlite # Command-line interface for SQLite + - ssh-copy-id # Add a public key to a remote machine's authorized_keys file + - starship # Cross-shell prompt for astronauts + - stoken # Tokencode generator compatible with RSA SecurID 128-bit (AES) + - stonks # A terminal based stock visualizer and tracker. + - tealdeer # Very fast implementation of tldr in Rust + - tlk/imagemagick-x11/imagemagick # Tools and libraries to manipulate images in many formats (X11 support) + - tokei # Program that allows you to count code, quickly + - tox # Generic Python virtualenv management and test command-line tool + - tree # Display directories as trees (with optional color/HTML output) + - watch # Executes a program periodically, showing output fullscreen + - wget # Internet file retriever + - wireguard-tools # Tools for the WireGuard secure network tunnel + - wrk # HTTP benchmarking tool + - yadm # Yet Another Dotfiles Manager + - yarn # JavaScript package manager + - youtube-dl # Download YouTube videos from the command-line + - yq # Process YAML documents from the CLI + - zsh # UNIX shell (command interpreter) + - zsh-history-substring-search # Zsh port of Fish shell's history search diff --git a/vars/osx-defaults.yml b/vars/osx-defaults.yml new file mode 100644 index 000000000..f5807fb1c --- /dev/null +++ b/vars/osx-defaults.yml @@ -0,0 +1,424 @@ +--- +osx_defaults: +# Expand save panel by default + - key: NSNavPanelExpandedStateForSaveMode + type: bool + value: true + +# Expand print panel by default + - key: PMPrintingExpandedStateForPrint + type: bool + value: true + +# Save to disk (not to iCloud) by default + - key: NSDocumentSaveNewDocumentsToCloud + type: bool + value: false + +# Automatically quit printer app once the print jobs complete + - domain: com.apple.print.PrintingPrefs + key: Quit When Finished + type: bool + value: true + +# Reveal IP address, hostname, OS version, etc. when clicking the clock +# in the login window + - domain: /Library/Preferences/com.apple.loginwindow + key: AdminHostInfo + value: HostName + become: yes + +# Disable smart quotes as they’re annoying when typing code + - key: NSAutomaticQuoteSubstitutionEnabled + type: bool + value: false + +# Disable smart dashes as they’re annoying when typing code + - key: NSAutomaticDashSubstitutionEnabled + type: bool + value: false + +# Trackpad: map bottom right corner to right-click + - domain: com.apple.driver.AppleBluetoothMultitouch.trackpad + key: TrackpadCornerSecondaryClick + type: int + value: 2 + - domain: com.apple.driver.AppleBluetoothMultitouch.trackpad + key: TrackpadRightClick + type: bool + value: true + - host: currentHost + key: com.apple.trackpad.trackpadCornerClickBehavior + type: int + value: 1 + - host: currentHost + key: com.apple.trackpad.enableSecondaryClick + type: bool + value: true + +# Enable full keyboard access for all controls +# (e.g. enable Tab in modal dialogs - 0 = text boxes and lists, 2/3 = all controls) + - key: AppleKeyboardUIMode + type: int + value: 0 + +# Use scroll gesture with the Ctrl (^) modifier key to zoom + - domain: com.apple.universalaccess + key: closeViewScrollWheelToggle + type: bool + value: true + - domain: com.apple.universalaccess + key: HIDScrollZoomModifierMask + type: int + value: 262144 +# Follow the keyboard focus while zoomed in + - domain: com.apple.universalaccess + key: closeViewZoomFollowsFocus + type: bool + value: true + +# Disable press-and-hold for keys in favor of key repeat + - key: ApplePressAndHoldEnabled + type: bool + value: false + +# Set a blazingly fast keyboard repeat rate, and make it happen more quickly. + - key: InitialKeyRepeat + type: int + value: 20 + - key: KeyRepeat + type: int + value: 1 + +# Disable auto-correct + - key: NSAutomaticSpellingCorrectionEnabled + type: bool + value: false + +# Require password immediately after sleep or screen saver begins + - domain: com.apple.screensaver + key: askForPassword + type: int + value: 1 + - domain: com.apple.screensaver + key: askForPasswordDelay + type: int + value: 0 + +# Save screenshots to the desktop + - domain: com.apple.screencapture + key: location + value: "${HOME}/Screenshots" + +# Prefix them with "Screenshot", rather than "Screen Shot" (macOS Catalina+) + - domain: com.apple.screencapture + key: name + value: "Screenshot" + +# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF) + - domain: com.apple.screencapture + key: type + value: "png" + +# Disable shadow in screenshots + - domain: com.apple.screencapture + key: disable-shadow + type: bool + value: true + +# Enable subpixel font rendering on non-Apple LCDs + - key: AppleFontSmoothing + type: int + value: 2 + +# Set Desktop as the default location for new Finder windows +# For other paths, use `PfLo` and `file:///full/path/here/` + - domain: com.apple.finder + key: NewWindowTarget + value: "PfDe" + - domain: com.apple.finder + key: NewWindowTargetPath + value: "file://${HOME}/Desktop/" + +# Show icons for hard drives, servers, and removable media on the desktop + - domain: com.apple.finder + key: ShowExternalHardDrivesOnDesktop + type: bool + value: true + - domain: com.apple.finder + key: ShowHardDrivesOnDesktop + type: bool + value: true + - domain: com.apple.finder + key: ShowMountedServersOnDesktop + type: bool + value: true + - domain: com.apple.finder + key: ShowRemovableMediaOnDesktop + type: bool + value: true + +# Finder: show hidden files by default + - domain: com.apple.finder + key: AppleShowAllFiles + type: bool + value: true + +# Finder: show all filename extensions + - key: AppleShowAllExtensions + type: bool + value: true + +# Finder: show status bar + - domain: com.apple.finder + key: ShowStatusBar + type: bool + value: true + +# Finder: allow text selection in Quick Look + - domain: com.apple.finder + key: QLEnableTextSelection + type: bool + value: true + +# Display full POSIX path as Finder window title + - domain: com.apple.finder + key: _FXShowPosixPathInTitle + type: bool + value: true + +# When performing a search, search the current folder by default + - domain: com.apple.finder + key: FXDefaultSearchScope + value: "SCcf" + +# Disable the warning when changing a file extension + - domain: com.apple.finder + key: FXEnableExtensionChangeWarning + type: bool + value: false + +# Enable spring loading for directories + - key: com.apple.springing.enabled + type: bool + value: true + +# Remove the spring loading delay for directories + - key: com.apple.springing.delay + type: float + value: 0.1 + +# Avoid creating .DS_Store files on network volumes + - domain: com.apple.desktopservices + key: DSDontWriteNetworkStores + type: bool + value: true + +# Avoid creating .DS_Store on USB volumes + - domain: com.apple.desktopservices + key: DSDontWriteUSBStores + type: bool + value: true + +# Automatically open a new Finder window when a volume is mounted + - domain: com.apple.frameworks.diskimages + key: auto-open-ro-root + type: bool + value: true + - domain: com.apple.frameworks.diskimages + key: auto-open-rw-root + type: bool + value: true + - domain: com.apple.finder + key: OpenWindowForNewRemovableDisk + type: bool + value: true + +# Use column view in all Finder windows by default +# Four-letter codes for the other view modes: `icnv`, `Nlsv`, `clmv`, `Flwv` + - domain: com.apple.finder + key: FXPreferredViewStyle + value: "clmv" + +# Set the icon size of Dock items + - domain: com.apple.dock + key: tilesize + type: int + value: 30 + +# Speed up Mission Control animations + - domain: com.apple.dock + key: expose-animation-duration + type: float + value: 0.15 + +# Make Dock icons of hidden applications translucent + - domain: com.apple.dock + key: showhidden + type: bool + value: true + +# Enable the 'reduce transparency' option on Yosemite. Save GPU cycles. + - domain: com.apple.universalaccess + key: reduceTransparency + type: bool + value: true + +# Hot corners +# Possible values: +# 0: no-op +# 2: Mission Control +# 3: Show application windows +# 4: Desktop +# 5: Start screen saver +# 6: Disable screen saver +# 7: Dashboard +# 10: Put display to sleep +# 11: Launchpad +# 12: Notification Center +# Bottom right screen corner → Put display to sleep + - domain: com.apple.dock + key: wvous-br-corner + type: int + value: 10 + - domain: com.apple.dock + key: wvous-br-modifier + type: int + value: 0 +# Top right screen corner → Mission Control + - domain: com.apple.dock + key: wvous-tr-corner + type: int + value: 2 + - domain: com.apple.dock + key: wvous-tr-modifier + type: int + value: 0 +# Bottom left screen corner → Desktop + - domain: com.apple.dock + key: wvous-bl-corner + type: int + value: 4 + - domain: com.apple.dock + key: wvous-bl-modifier + type: int + value: 0 + +# Set Safari’s home page to `about:blank` for faster loading + - domain: com.apple.Safari + key: HomePage + value: "about:blank" + +# Prevent Safari from opening ‘safe’ files automatically after downloading + - domain: com.apple.Safari + key: AutoOpenSafeDownloads + type: bool + value: false + +# Disable Safari’s thumbnail cache for History and Top Sites + - domain: com.apple.Safari + key: DebugSnapshotsUpdatePolicy + type: int + value: 2 + +# Enable Safari’s debug menu + - domain: com.apple.Safari + key: IncludeInternalDebugMenu + type: bool + value: true + +# Enable the Develop menu and the Web Inspector in Safari + - domain: com.apple.Safari + key: IncludeDevelopMenu + type: bool + value: true + - domain: com.apple.Safari + key: WebKitDeveloperExtrasEnabledPreferenceKey + type: bool + value: true + - domain: com.apple.Safari + key: com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled + type: bool + value: true + +# Add a context menu item for showing the Web Inspector in web views + - key: WebKitDeveloperExtras + type: bool + value: true + +# Disable send and reply animations in Mail.app + - domain: com.apple.mail + key: DisableReplyAnimations + type: bool + value: true + - domain: com.apple.mail + key: DisableSendAnimations + type: bool + value: true + +# Copy email addresses as `foo@example.com` instead of `Foo Bar ` in Mail.app + - domain: com.apple.mail + key: AddressesIncludeNameOnPasteboard + type: bool + value: false + +# Disable Spotlight indexing for any volume that gets mounted and has not yet +# been indexed before. +# Use `sudo mdutil -i off "/Volumes/foo"` to stop indexing any volume. + - domain: /.Spotlight-V100/VolumeConfiguration + key: Exclusions + type: array + value: "/Volumes" + become: yes + +# Only use UTF-8 in Terminal.app + - domain: com.apple.terminal + key: StringEncodings + type: array + value: 4 + +# Show the main window when launching Activity Monitor + - domain: com.apple.ActivityMonitor + key: OpenMainWindow + type: bool + value: true + +# Visualize CPU usage in the Activity Monitor Dock icon + - domain: com.apple.ActivityMonitor + key: IconType + type: int + value: 5 + +# Show all processes in Activity Monitor + - domain: com.apple.ActivityMonitor + key: ShowCategory + type: int + value: 0 + +# Use plain text mode for new TextEdit documents + - domain: com.apple.TextEdit + key: RichText + type: int + value: 0 + +# Open and save files as UTF-8 in TextEdit + - domain: com.apple.TextEdit + key: PlainTextEncoding + type: int + value: 4 + - domain: com.apple.TextEdit + key: PlainTextEncodingForWrite + type: int + value: 4 + +# Disable sensitive and senseless swipe-based navigation + - domain: com.google.Chrome + key: AppleEnableSwipeNavigateWithScrolls + type: bool + value: false + +# Use the system print dialog + - domain: com.google.Chrome + key: DisablePrintPreview + type: bool + value: true diff --git a/vars/vscode-extensions.yml b/vars/vscode-extensions.yml new file mode 100644 index 000000000..c927e42c9 --- /dev/null +++ b/vars/vscode-extensions.yml @@ -0,0 +1,37 @@ +--- +vscode_extensions: + - 74th.json-yaml-schema-selector + - AdamRybak.graycat-sql-formatter + - alexcvzz.vscode-sqlite + - bierner.markdown-mermaid + - CJamesMay.plush # Language support for the Go Plush templating package + - DavidAnson.vscode-markdownlint + - dbaeumer.vscode-eslint + - vscode-icons-team.vscode-icons + - eamodio.gitlens + - EditorConfig.EditorConfig + - esbenp.prettier-vscode + - fwcd.kotlin + - golang.go + - hashicorp.terraform + - janisdd.vscode-edit-csv + - JSONResume.vscode-jsonresume + - lacroixdavid1.vscode-format-context-menu + - laktak.hjson + - lextudio.restructuredtext + - ms-azuretools.vscode-docker + - ms-kubernetes-tools.vscode-kubernetes-tools + - ms-python.python + - ms-python.vscode-pylance + - ms-toolsai.jupyter + - ms-vscode-remote.remote-containers + - njpwerner.autodocstring + - octref.vetur + - redhat.vscode-yaml + - reflog.jsonresume + - samuelcolvin.jinjahtml + - syler.sass-indented + - tamasfe.even-better-toml + - tomoyukim.vscode-mermaid-editor + - twixes.pypi-assistant + - Tyriar.sort-lines