- Neovim installed perfectly.
- Installer also supports macOS to sync same config on Intel & Apple silicon.
Simplify the installation of Homebrew on Synology NAS devices running DSM 7.2 or later with this script. This repository streamlines the process, ensuring comprehensive coverage of available packages for macOS/Linux on Synology. If you would like everything configured exactly the same way on macOS, it's covered here. The installer will replicate the config on macOS.
Homebrew, a package manager for macOS and Linux, unlocks a vast ecosystem of modern software and libraries. Dive into the richer features as mentioned below.
-
Installation Options:
Choose between a Minimal or Advanced installation. If you just want Homebrew to work, then the Minimal install is for you. -
Profile Creation:
Configures the default Synologyash/sh
profile and newly installedzsh
to work seamlessly with Homebrew. -
Synology Integration:
Resolves conflicts with existing Synology packages without removing anything from your NAS. -
Easy Uninstall:
Revert to the original state of your NAS with the included uninstall script. -
Cross-Platform Compatibility:
This same installer can be used on macOS. Linuxbrew and Homebrew will work with theconfig.yaml
to provide the same experience, however you choose to configure it. -
COMING SOON:
A choice of terminal emulators preconfigured and further themes.
Before you begin, ensure the following setup:
-
Synology NAS Requirements:
- A Synology NAS running DSM 7.2 or later.
- SSH access enabled on your NAS.
- User homes enabled on your NAS.
- A scheduled task to ensure Homebrew is mounted after each restart (detailed instructions below).
-
Synology Git Installation via CLI:
If Git is not already installed in your Synology environment, you can quickly install it via CLI. This will later be upgraded to Homebrew's Git version:
curl -sSL https://raw.githubusercontent.com/MrCee/Synology-Git/refs/heads/main/install-synology-git.sh | bash
-
iTerm2 Configuration:
Use iTerm2 (or an alternative terminal emulator other than macOS Terminal.app) on your local machine for an improved experience.
Ensure the following:
- Compatible Nerd Fonts installed.
- A configured color profile.
Refer to the iTerm2 Configuration Guide for detailed setup instructions.
SSH into your Synology NAS running DSM 7.2 or above and run the following command to download the installer into your home directory and execute it:
git clone https://github.com/MrCee/Synology-Homebrew.git ~/Synology-Homebrew && \
~/Synology-Homebrew/install-synology-homebrew.sh
This will provide the Homebrew basics, ignore packages in config.yaml
, leaving the rest to you.
You can also use this option to uninstall packages in config.yaml
installed by option 2 by running the script again.
Full setup includes packages in config.yaml
.
Recommended if you want to get started with Neovim or install some of the great packages listed.
Both install types include the following essential packages to ensure Homebrew runs smoothly on Synology:
- git, ruby, glibc, gcc, clang-build-analyzer (which includes latest python & pip), yq, zsh, oh-my-zsh.
To manage packages, plugins, and themes, edit the config.yaml
file and set the install flag to one of three options: true, false, or skip.
- true: Install the package, plugin, or theme.
- false: Uninstall the package, plugin, or theme.
- skip: Do nothing, leaving the current state unchanged.
Plugins and themes can be defined under the plugins section. Plugin names will be updated to reflect the last part of the URL for consistency.
The below is a snippet of how config.yaml
should be formatted. Please see the file downloaded from this repository for the full scope.
packages:
make:
install: "true"
aliases: []
eval: []
jq:
install: "true"
aliases: []
eval: []
perl:
install: "true"
aliases: []
eval:
- "perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5"
neovim:
install: "true"
aliases:
vim: "nvim"
eval: []
stow:
install: "skip"
aliases: []
eval: []
fzf:
install: "true"
aliases: []
eval:
- "fzf --zsh"
bat:
install: "true"
aliases:
cat: "bat --paging=never"
eval: []
eza:
install: "true"
aliases:
ls: "eza --color=always --group-directories-first --icons"
ll: "eza -la --icons --octal-permissions --group-directories-first --icons"
l: "eza -bGF --header --git --color=always --group-directories-first --icons"
llm: "eza -lbGd --header --git --sort=modified --color=always --group-directories-first --icons"
la: "eza --long --all --group --group-directories-first"
lx: "eza -lbhHigUmuSa@ --time-style=long-iso --git --color-scale --color=always --group-directories-first --icons"
lS: "eza -1 --color=always --group-directories-first --icons"
lt: "eza --tree --level=2 --color=always --group-directories-first --icons"
l.: "eza -a | grep -E '^\\.'"
eval: []
thefuck:
install: "true"
aliases: []
eval:
- "thefuck --alias"
zoxide:
install: "true"
aliases:
cd: "z"
eval:
- "zoxide init zsh"
jesseduffield/lazygit/lazygit:
install: "true"
aliases:
lg: "lazygit"
eval: []
plugins:
powerlevel10k:
install: "true"
url: "https://github.com/romkatv/powerlevel10k"
directory: "~/.oh-my-zsh/custom/themes/powerlevel10k"
aliases: []
eval: []
kickstart.nvim:
install: "true"
url: "https://github.com/nvim-lua/kickstart.nvim"
directory: "~/.config/nvim-kickstart"
aliases:
nvim: "NVIM_APPNAME=\"nvim-kickstart\" nvim"
eval: []
Modify packages to be installed by editing config.yaml and setting the install flag to true, false, or skip.
Package | Description | Dependency |
---|---|---|
brew | Homebrew - The Missing Package Manager now for MacOS & Linux. | Essential for: Synology-Homebrew |
git | Latest version replaces Synology Package Centre version. | Essential for: Synology-Homebrew |
ruby | Latest version replaces Synology Package Centre version. | Essential for: Synology-Homebrew |
zsh | UNIX shell (command interpreter). | Essential for: Synology-Homebrew |
python3 / pip3 | Installed with clang-build-analyzer. Latest version 3.12.3 | Essential for: Synology-Homebrew |
glibc | The GNU C Library - The project provides the core libraries for the GNU system. | Essential for: Synology-Homebrew |
gcc | GNU compiler collection. | Essential for: Synology-Homebrew |
clang | installed with clang-build-analyzer containing many essential tools. | Essential for: Synology-Homebrew |
oh-my-zsh | Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. | Essential for: Synology-Homebrew, zsh |
jq | Latest version of Lightweight and flexible command-line JSON processor | Essential for: Synology-Homebrew |
make | Utility for directing compilation. | Essential for: neovim plugins |
node | JavaScript runtime environment. | Essential for: neovim |
neovim | Hyperextensible Vim-based text editor. | Recommended for: Synology |
powerlevel10k | A theme for zsh. | Recommended for: oh-my-zsh |
zsh-syntax-highlighting | A plugin for zsh. | Recommended for: oh-my-zsh |
zsh-autosuggestions | A plugin for zsh. | Recommended for: oh-my-zsh |
ripgrep | Ripgrep is a line-oriented search tool that recursively searches the current directory for a regex pattern. | Essential for: neovim, telescope, fzf |
fd | Simple, fast and user-friendly alternative to find. | Essential for: neovim, telescope |
fzf | A command-line fuzzy finder. | Essential for: neovim, telescope |
fzf-git.sh | Bash and zsh key bindings for Git objects. | Recommended for: neovim, telescope, fzf |
bat | A cat clone with syntax highlighting and Git integration. | Recommended for: zsh, neovim |
git-delta | Language syntax highlighting for diff using a Levenshtein edit inference algorithm. | Recommended for: neovim |
eza | A modern, maintained replacement for the venerable file-listing command-line program ls | Recommended for: zsh, neovim |
tldr | The tldr-pages project is a collection of community-maintained help pages for command-line tools | Recommended for: neovim |
thefuck | A magnificent app that corrects errors in previous console command. | Recommended for: zsh |
kickstart.nvim | A starting point for Neovim. | Optional for: neovim |
perl | Highly capable, feature-rich programming language. | Essential for: stow |
stow | GNU Stow: Organize software neatly under a single directory tree. | Optional |
zoxide | Zoxide is a smarter cd command, inspired by z and autojump | Recommended for: zsh |
lazygit | AMAZING Simple terminal UI for git commands | Recommended for: zsh, neovim |
Neovim (nvim) is ready to go with essential requirements configured within a separate file nvim_config.sh
in which you can run indepenently to enable clipboard and further required files.
This includes:
- Enable clipboard over SSH using OSC52 for all nvim configurations stored or symlinked in
~/.config
. - Linting Python with
pip3 install pynvim
. - Installing neovim gem.
- Updating outdated gems.
- Adding fzf-git.sh with Git key bindings to
~/.scripts
directory.
In the plugins section of config.yaml
, set kickstart.nvim
to true to install and configure Neovim with kickstart.nvim. This provides a lazy configuration with everything working out of the box. It will be installed to the specified directory in config.yaml with a backup of any existing config to your home folder.
To switch between Neovim configurations easily, use aliases in ~/.zshrc
and swap to your config:
alias nvim="NVIM_APPNAME=\"nvim-kickstart\" nvim"
# or for example if you have your own nvim config...
alias nvim="NVIM_APPNAME=\"nvim-mrcee\" nvim"
See kickstart.nvim provided in the config.yaml example above.
If no alias is set, Neovim will attempt to use the default nvim config location ~/.config/nvim
Run :checkhealth in Neovim after installation to see more detail about any further plugins you may need.
The Synology-Homebrew + Neovim setup comes pre-configured with a sleek Zsh theme and several useful plugins to enhance your command-line experience. Customize your zsh with ease using the p10k configure
command and enjoy a fully tailored terminal environment.
To ensure the Homebrew directory is mounted after each restart, add a Triggered Task with a User-defined script. Go to Control Panel > Task Scheduler, click Create, and select Triggered Task >> User-defined Script and enter the following...
1st tab:
- Task name: "Homebrew Boot"
- User: root
- Event: Boot-up
- Enabled: True
2nd tab:
- Paste the following User-defined script...
#!/bin/bash
[[ ! -d /home ]] && mkdir /home
mount -o bind "/volume1/homes" /home
Refer to Homebrew documentation for usage instructions. Contributions are welcome! Open an issue or submit a pull request on GitHub for feedback or suggestions.
This script is provided as-is without any warranty. Review and understand the script's changes to your system before running it. This project is licensed under the MIT License.
Thanks to the many people and teams that contribute to the packages installed by this script, the GitHub & Synology community, and some of the best on youtube. @ogerardin, @AppleBoiy, @josean-dev, @tjdevries.