Plugin for dotbot to streamline package management,
installs packages with the system package manager on Linux or brew if on OSX.
Currently supports:
dnf
apt-get
pacman
brew
Just add it as a submodule of your dotfiles repository
git submodule add https://github.com/code-maniac/dotbot-omnipkg
Modify install
script so that it automatically enables dotbot-omnipkg
plugin
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
OMNIPKGPLUGIN="${BASEDIR}/dotbot-omnipkg/omnipkg.py"
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" \
-d "${BASEDIR}" \
-c "${CONFIG}" \
-p "${OMNIPKGPLUGIN}" \
"${@}"
The following directives are supported:
update
install
upgrade
Each being placed under the main "omnipkg" directive
- omnipkg:
- update
- omnipkg:
- upgrade
- omnipkg:
- install: [
kitty,
tmux,
zsh,
neovim]
- omnipkg:
- install: [
[ python3, python ]
]
Priority is given to first package in the list.
To be used when a package has a different name depending on the distro that it's being installed on.
In the above example python3
is named python3
on OSX and Ubuntu but is named python
on Arch.
- omnipkg:
- install: [
{ dnf: https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm },
]
Above installs rpmfusion free repos if dnf is the package manager otherwise is ignored
- omnipkg:
- install: [
{ linux: g++ }
]
Above installs g++ on linux but is ignored on mac
The following filters are supported:
- dnf - for dnf package manager
- pac - for pacman package manager
- apt - for apt-get package manager
- brew - for brew package manager
- linux - for linux platform
- mac - for mac platform
- else - for any not specified
Priority is given to package manager first, then platform, then else
Additionally packages can be restricted to only install on systems with an installed gui.
- omnipkg:
- install: [
{ linux: gimp, require_gui: true }
]
Above installs gimp only on a system with an installed gui. It will not install in WSL or a docker image as an example.
- Add directive to support adding new PPA repositories
- Add support for additional package managers -
zypp
,emerge
etc