From 789371a10a0fb691add194c3112e4d15902915c8 Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Sun, 5 Dec 2021 23:34:35 +0100 Subject: explain and add example for default configurations --- README.org | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'README.org') diff --git a/README.org b/README.org index f2d7e15..cf50654 100644 --- a/README.org +++ b/README.org @@ -40,11 +40,36 @@ Now creating the same OCaml environment only requires the following declaration. * Setup -To use =venv-manager=, clone this repository in =~/.config/venv-manager=. A new -virtual environment configuration can then be created by copying the +To use =venv-manager=, clone this repository in =~/.config/venv-manager=. + +A new virtual environment configuration can then be created by copying the =shell-template.nix= (use an alias for that !) and filling in the =settings= attribute set. The available options can be found in the [[file:modules/]] files. +A default configuration that will be used in all virtual environments may also +be declared in ~config/default.nix~. For example : +#+BEGIN_SRC nix + { config, lib, pkgs, ... }: + + { + # enable support for direnv in all virtual environments + # this value cannot be overriden locally + direnv.enable = true; + + # enable support for Tuareg (OCaml's Emacs mode) in all virtual environments + # where OCaml is enabled + # this value can be overriden locally + ocaml.tuareg.enable = lib.mkDefault true; + + # an example of something a little more complex + # this value will be merged with other values declared locally + buildInputs = lib.optional (config.ocaml.enable && + config.python.enable) + pkgs.setupcfg2nix; + } +#+END_SRC + + * To do ~venv-manager~ is still in its early development phase and there is still a lot -- cgit v1.2.3