Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 1.29 KB

README.md

File metadata and controls

46 lines (35 loc) · 1.29 KB

Dotbot nix-env plugin

A plugin for dotbot, which installs packages using the nix-env command from the Nix package manager.

Install

git submodule add [email protected]:DanTheMinotaur/dotbot-nix-env.git
git submodule update --init --recursive

# Pass --plugin-dir dotbot-nix-env to you dotbot command
./install --plugin-dir dotbot-nix-env

Usage

Add the nixenv directive to your install.yaml.

Using string values is equivalent to nix-env -iA <package>, which will install the latest version available. Using a hash { <package>: <revision> } is equivalent nix-env -iA <package> -f <revision>.

You can find package revisions here: https://lazamar.co.uk/nix-versions/

Example config

- nixenv:
    packages:
      - nodejs-15_x: 'https://github.com/NixOS/nixpkgs/archive/5c79b3dda06744a55869cae2cba6873fbbd64394.tar.gz'
      - nixpkgs.htop
      - nixpkgs.multitail

Dev Setup

git clone https://github.com/anishathalye/dotbot.git
pip install -e dotbot/

Live Test

./dotbot/bin/dotbot -d ./tests/example/ --plugin-dir ./ -c ./tests/example/install.yml

Run Unit Tests

python -m unittest discover -s tests/ -p '*_test.py'