mfi: relocatable data dir
This commit is contained in:
parent
08546d3a20
commit
86357de0c8
|
@ -10,6 +10,7 @@ let
|
|||
{ what = "${pkgs.mfi}/dl"; where = "${stateDir}/dl"; }
|
||||
{ what = "${pkgs.mfi}/lib"; where = "${stateDir}/lib"; }
|
||||
{ what = "${pkgs.mongodb248}/bin"; where = "${stateDir}/bin"; }
|
||||
{ what = "${cfg.dataDir}"; where = "${stateDir}/data"; }
|
||||
];
|
||||
systemdMountPoints = map (m: "${utils.escapeSystemdPath m.where}.mount") mountPoints;
|
||||
ports = [ 6080 6880 6443 6843 ];
|
||||
|
@ -23,6 +24,15 @@ in
|
|||
default = true;
|
||||
description = "Whether to open TCP ports ${concatMapStrings (a: "${toString a} ") ports}for the services.";
|
||||
};
|
||||
dataDir = mkOption {
|
||||
type = types.str;
|
||||
default = "${stateDir}/data";
|
||||
description = ''
|
||||
Where to store the database and other data.
|
||||
|
||||
This directory will be bind-mounted to ${stateDir}/data as part of the service startup.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue