32 lines
908 B
Nix
32 lines
908 B
Nix
{ pkgs ? import <nixpkgs> { inherit system; }
|
|
, system ? builtins.currentSystem
|
|
, stateDir ? "/var"
|
|
, runtimeDir ? "${stateDir}/run"
|
|
, logDir ? "${stateDir}/log"
|
|
, spoolDir ? "${stateDir}/spool"
|
|
, cacheDir ? "${stateDir}/cache"
|
|
, libDir ? "${stateDir}/lib"
|
|
, tmpDir ? (if stateDir == "/var" then "/tmp" else "${stateDir}/tmp")
|
|
, forceDisableUserChange ? false
|
|
, processManager
|
|
, nix-processmgmt ? ../../../nix-processmgmt
|
|
}:
|
|
|
|
let
|
|
constructors = import ../../services-agnostic/constructors.nix {
|
|
inherit pkgs stateDir runtimeDir logDir tmpDir cacheDir libDir spoolDir forceDisableUserChange processManager nix-processmgmt;
|
|
};
|
|
in
|
|
rec {
|
|
docker = {
|
|
pkg = constructors.docker {};
|
|
};
|
|
|
|
docker-secondary = rec {
|
|
pkg = constructors.docker {
|
|
instanceSuffix = "-secondary";
|
|
extraArgs = [ "--iptables=false" ]; # Avoids conflicting NAT settings with the primary instances
|
|
};
|
|
};
|
|
}
|