unifi: relocatable data dir
This commit is contained in:
parent
86357de0c8
commit
032f3e721c
@ -17,6 +17,10 @@ let
|
|||||||
what = "${pkgs.mongodb}/bin";
|
what = "${pkgs.mongodb}/bin";
|
||||||
where = "${stateDir}/bin";
|
where = "${stateDir}/bin";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
what = "${cfg.dataDir}";
|
||||||
|
where = "${stateDir}/data";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
systemdMountPoints = map (m: "${utils.escapeSystemdPath m.where}.mount") mountPoints;
|
systemdMountPoints = map (m: "${utils.escapeSystemdPath m.where}.mount") mountPoints;
|
||||||
in
|
in
|
||||||
@ -32,6 +36,16 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.unifi.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.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user