Merge pull request #15 from hercules-ci/issue-7-rename-to-composition
Use the word 'composition' where applicable.
This commit is contained in:
commit
bb5a8810e8
6 changed files with 32 additions and 10 deletions
|
@ -140,7 +140,7 @@ do_eval() {
|
||||||
echo 1>&2 "Evaluating configuration..."
|
echo 1>&2 "Evaluating configuration..."
|
||||||
# read-write-mode is required for import from derivation
|
# read-write-mode is required for import from derivation
|
||||||
nix-instantiate \
|
nix-instantiate \
|
||||||
"$nix_dir/eval-docker-compose.nix" \
|
"$nix_dir/eval-composition.nix" \
|
||||||
--eval \
|
--eval \
|
||||||
--read-write-mode \
|
--read-write-mode \
|
||||||
--json \
|
--json \
|
||||||
|
@ -155,7 +155,7 @@ do_eval() {
|
||||||
do_build() {
|
do_build() {
|
||||||
echo 1>&2 "Building configuration..."
|
echo 1>&2 "Building configuration..."
|
||||||
nix-build \
|
nix-build \
|
||||||
"$nix_dir/eval-docker-compose.nix" \
|
"$nix_dir/eval-composition.nix" \
|
||||||
--out-link $docker_compose_yaml \
|
--out-link $docker_compose_yaml \
|
||||||
--argstr uid "$UID" \
|
--argstr uid "$UID" \
|
||||||
--arg modules "$modules" \
|
--arg modules "$modules" \
|
||||||
|
@ -190,7 +190,7 @@ To bring the top-level Nixpkgs attributes into scope
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
cat >"$REPL_TMP" <<EOF
|
cat >"$REPL_TMP" <<EOF
|
||||||
import $nix_dir/eval-docker-compose.nix {
|
import $nix_dir/eval-composition.nix {
|
||||||
uid = "$UID";
|
uid = "$UID";
|
||||||
modules = $modules;
|
modules = $modules;
|
||||||
pkgs = $pkgs_argument;
|
pkgs = $pkgs_argument;
|
||||||
|
|
|
@ -1,3 +1,14 @@
|
||||||
|
/*
|
||||||
|
|
||||||
|
This is a composition-level module.
|
||||||
|
|
||||||
|
It defines the low-level options that are read by arion, like
|
||||||
|
- build.dockerComposeYaml
|
||||||
|
|
||||||
|
It declares options like
|
||||||
|
- docker-compose.services
|
||||||
|
|
||||||
|
*/
|
||||||
{ pkgs, uid, lib, config, ... }:
|
{ pkgs, uid, lib, config, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
|
@ -11,7 +11,7 @@ let
|
||||||
|
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
composite = lib.evalModules {
|
composition = lib.evalModules {
|
||||||
check = true;
|
check = true;
|
||||||
modules = builtinModules ++ modules;
|
modules = builtinModules ++ modules;
|
||||||
};
|
};
|
||||||
|
@ -22,12 +22,12 @@ let
|
||||||
];
|
];
|
||||||
|
|
||||||
argsModule = {
|
argsModule = {
|
||||||
_file = ./eval-docker-compose.nix;
|
_file = ./eval-composition.nix;
|
||||||
key = ./eval-docker-compose.nix;
|
key = ./eval-composition.nix;
|
||||||
config._module.args.pkgs = lib.mkIf (pkgs != null) (lib.mkForce pkgs);
|
config._module.args.pkgs = lib.mkIf (pkgs != null) (lib.mkForce pkgs);
|
||||||
config._module.args.uid = uid;
|
config._module.args.uid = uid;
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
# Typically you need composite.config.build.dockerComposeYaml
|
# Typically you need composition.config.build.dockerComposeYaml
|
||||||
composite
|
composition
|
|
@ -1,4 +1,9 @@
|
||||||
# Bind-mounts the host store
|
/*
|
||||||
|
|
||||||
|
This service-level bind mounts the host store into the container
|
||||||
|
when the service.useHostStore option is set to true.
|
||||||
|
|
||||||
|
*/
|
||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib) mkOption types mkIf;
|
inherit (lib) mkOption types mkIf;
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
/*
|
||||||
|
|
||||||
|
This service-level module defines the build.service option, using
|
||||||
|
the user-facing options service.image, service.volumes, etc.
|
||||||
|
|
||||||
|
*/
|
||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
# To make some prebuilt derivations available in the vm
|
# To make some prebuilt derivations available in the vm
|
||||||
preEval = import ../../src/nix/eval-docker-compose.nix {
|
preEval = import ../../src/nix/eval-composition.nix {
|
||||||
modules = [ ../../examples/minimal/arion-compose.nix ];
|
modules = [ ../../examples/minimal/arion-compose.nix ];
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue