Use configurable libDir property
This commit is contained in:
parent
3507429547
commit
878ea506e0
|
@ -5,6 +5,7 @@
|
|||
, runtimeDir
|
||||
, cacheDir
|
||||
, spoolDir
|
||||
, libDir
|
||||
, tmpDir
|
||||
, forceDisableUserChange
|
||||
, processManager
|
||||
|
@ -13,7 +14,7 @@
|
|||
|
||||
let
|
||||
constructors = import ../services-agnostic/constructors.nix {
|
||||
inherit nix-processmgmt pkgs stateDir logDir runtimeDir cacheDir spoolDir tmpDir forceDisableUserChange processManager ids;
|
||||
inherit nix-processmgmt pkgs stateDir logDir runtimeDir cacheDir spoolDir libDir tmpDir forceDisableUserChange processManager ids;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
@ -81,7 +82,7 @@ in
|
|||
};
|
||||
|
||||
extendableSupervisord = import ./supervisord/extendable-supervisord.nix {
|
||||
inherit stateDir;
|
||||
inherit libDir;
|
||||
inherit (pkgs) lib;
|
||||
supervisordConstructorFun = constructors.extendableSupervisord;
|
||||
dysnomia = pkgs.dysnomia.override (origArgs: {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{supervisordConstructorFun, lib, dysnomia, stateDir}:
|
||||
{supervisordConstructorFun, lib, dysnomia, libDir}:
|
||||
|
||||
{ instanceSuffix ? "", instanceName ? "supervisord${instanceSuffix}"
|
||||
{ instanceSuffix ? ""
|
||||
, instanceName ? "supervisord${instanceSuffix}"
|
||||
, containerName ? "supervisord-program${instanceSuffix}"
|
||||
, inetHTTPServerPort ? 9001
|
||||
, postInstall ? ""
|
||||
|
@ -9,7 +10,7 @@
|
|||
}:
|
||||
|
||||
let
|
||||
supervisordTargetDir = "${stateDir}/lib/${instanceName}/conf.d";
|
||||
supervisordTargetDir = "${libDir}/${instanceName}/conf.d";
|
||||
|
||||
pkg = supervisordConstructorFun {
|
||||
inherit instanceName inetHTTPServerPort;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
, runtimeDir
|
||||
, cacheDir
|
||||
, spoolDir
|
||||
, libDir
|
||||
, tmpDir
|
||||
, forceDisableUserChange
|
||||
, processManager
|
||||
|
@ -52,7 +53,7 @@ in
|
|||
};
|
||||
|
||||
dbus-daemon = import ./dbus-daemon {
|
||||
inherit createManagedProcess stateDir runtimeDir ids;
|
||||
inherit createManagedProcess libDir runtimeDir ids;
|
||||
inherit (pkgs) lib dbus writeTextFile;
|
||||
};
|
||||
|
||||
|
@ -88,18 +89,18 @@ in
|
|||
};
|
||||
|
||||
hydra-server = import ./hydra/hydra-server.nix {
|
||||
inherit createManagedProcess stateDir forceDisableUserChange;
|
||||
inherit createManagedProcess libDir forceDisableUserChange;
|
||||
inherit (pkgs) lib writeTextFile postgresql su;
|
||||
hydra = pkgs.hydra-unstable;
|
||||
};
|
||||
|
||||
influxdb = import ./influxdb {
|
||||
inherit createManagedProcess stateDir;
|
||||
inherit createManagedProcess libDir;
|
||||
inherit (pkgs) influxdb;
|
||||
};
|
||||
|
||||
simpleInfluxdb = import ./influxdb/simpleinfluxdb.nix {
|
||||
inherit createManagedProcess stateDir;
|
||||
inherit createManagedProcess libDir;
|
||||
inherit (pkgs) influxdb writeTextFile;
|
||||
};
|
||||
|
||||
|
@ -139,7 +140,7 @@ in
|
|||
};
|
||||
|
||||
sshd = import ./sshd {
|
||||
inherit createManagedProcess stateDir runtimeDir tmpDir forceDisableUserChange;
|
||||
inherit createManagedProcess libDir runtimeDir tmpDir forceDisableUserChange;
|
||||
inherit (pkgs) writeTextFile openssh;
|
||||
};
|
||||
|
||||
|
@ -164,7 +165,7 @@ in
|
|||
};
|
||||
|
||||
extendableSupervisord = import ./supervisord/extendable-supervisord.nix {
|
||||
inherit createManagedProcess stateDir runtimeDir logDir;
|
||||
inherit createManagedProcess libDir runtimeDir logDir;
|
||||
inherit (pkgs) writeTextFile;
|
||||
inherit (pkgs.pythonPackages) supervisor;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{createManagedProcess, lib, writeTextFile, dbus, stateDir, runtimeDir, ids ? {}}:
|
||||
{createManagedProcess, lib, writeTextFile, dbus, libDir, runtimeDir, ids ? {}}:
|
||||
{extraConfig ? "", busType ? "system", services ? []}:
|
||||
|
||||
let
|
||||
|
@ -101,7 +101,7 @@ in
|
|||
createManagedProcess {
|
||||
name = "dbus-daemon";
|
||||
initialize = ''
|
||||
mkdir -p ${stateDir}/lib/dbus
|
||||
mkdir -p ${libDir}/dbus
|
||||
mkdir -p ${dbusRuntimeDir}
|
||||
${dbus}/bin/dbus-uuidgen --ensure
|
||||
'';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{createManagedProcess, lib, writeTextFile, hydra, postgresql, su, stateDir, forceDisableUserChange}:
|
||||
{createManagedProcess, lib, writeTextFile, hydra, postgresql, su, libDir, forceDisableUserChange}:
|
||||
|
||||
{ instanceSuffix ? ""
|
||||
, instanceName ? "hydra-server${instanceSuffix}"
|
||||
|
@ -11,7 +11,7 @@
|
|||
, user ? "hydra-www${instanceSuffix}"
|
||||
, listenHost ? "*"
|
||||
, port ? 3000
|
||||
, baseDir ? "${stateDir}/lib/${hydraInstanceName}"
|
||||
, baseDir ? "${libDir}/${hydraInstanceName}"
|
||||
, dbi ? null
|
||||
, gcRootsDir ? "/nix/var/nix/gcroots/${hydraInstanceName}"
|
||||
, hydraURL ? "http://localhost"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{createManagedProcess, influxdb, stateDir}:
|
||||
{createManagedProcess, influxdb, libDir}:
|
||||
|
||||
{ instanceSuffix ? ""
|
||||
, instanceName ? "influxdb${instanceSuffix}"
|
||||
|
@ -10,7 +10,7 @@ let
|
|||
user = instanceName;
|
||||
group = instanceName;
|
||||
|
||||
influxdbStateDir = "${stateDir}/lib/${instanceName}";
|
||||
influxdbStateDir = "${libDir}/${instanceName}";
|
||||
in
|
||||
createManagedProcess {
|
||||
inherit instanceName user postInstall;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{createManagedProcess, influxdb, writeTextFile, stateDir}:
|
||||
{createManagedProcess, influxdb, writeTextFile, libDir}:
|
||||
|
||||
{ instanceSuffix ? ""
|
||||
, instanceName ? "influxdb${instanceSuffix}"
|
||||
|
@ -11,7 +11,7 @@
|
|||
}:
|
||||
|
||||
let
|
||||
influxdbStateDir = "${stateDir}/lib/${instanceName}";
|
||||
influxdbStateDir = "${libDir}/${instanceName}";
|
||||
|
||||
configFile = writeTextFile {
|
||||
name = "influxdb.conf";
|
||||
|
@ -34,7 +34,7 @@ let
|
|||
};
|
||||
in
|
||||
import ./default.nix {
|
||||
inherit createManagedProcess influxdb stateDir;
|
||||
inherit createManagedProcess influxdb libDir;
|
||||
} {
|
||||
inherit instanceName configFile postInstall;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{createManagedProcess, writeTextFile, openssh, stateDir, runtimeDir, tmpDir, forceDisableUserChange}:
|
||||
{createManagedProcess, writeTextFile, openssh, libDir, runtimeDir, tmpDir, forceDisableUserChange}:
|
||||
|
||||
{ instanceSuffix ? ""
|
||||
# The service is called sshd, and not openssh, because it relies on a hardcoded assumption that the privilege separation user is named sshd
|
||||
|
@ -8,7 +8,7 @@
|
|||
}:
|
||||
|
||||
let
|
||||
sshdStateDir = "${stateDir}/lib/${instanceName}";
|
||||
sshdStateDir = "${libDir}/${instanceName}";
|
||||
|
||||
sshdConfig = writeTextFile {
|
||||
name = "sshd_config";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{createManagedProcess, writeTextFile, supervisor, runtimeDir, logDir, stateDir}:
|
||||
{createManagedProcess, writeTextFile, supervisor, runtimeDir, logDir, libDir}:
|
||||
|
||||
{ instanceSuffix ? ""
|
||||
, instanceName ? "supervisord${instanceSuffix}"
|
||||
|
@ -7,7 +7,7 @@
|
|||
}:
|
||||
|
||||
let
|
||||
includeDir = "${stateDir}/lib/${instanceName}/conf.d";
|
||||
includeDir = "${libDir}/${instanceName}/conf.d";
|
||||
in
|
||||
import ./default.nix {
|
||||
inherit createManagedProcess supervisor logDir runtimeDir;
|
||||
|
|
Loading…
Reference in New Issue