feat(ows): support moving away onewaysync
We are running into too many out of disk space situations with OWS on the main disk. This way, we can reuse the Gerrit disk for all that data, which hopefully, is quite shared with Gerrit. Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
parent
070d97fdf1
commit
a3ebfcca50
|
@ -61,6 +61,8 @@
|
|||
{
|
||||
enable = true;
|
||||
|
||||
stateDirectory = "/gerrit-data/ows";
|
||||
|
||||
pushUrl = "ssh://ows_bot@cl.forkos.org:29418/nixpkgs";
|
||||
deployKeyPath = config.age.secrets.ows-deploy-key.path;
|
||||
|
||||
|
|
|
@ -71,6 +71,12 @@ in
|
|||
description = "Working directory for the service";
|
||||
};
|
||||
|
||||
stateDirectory = mkOption {
|
||||
type = types.str;
|
||||
default = "/var/lib/onewaysync";
|
||||
description = "State directory where the copies of nixpkgs are stored";
|
||||
};
|
||||
|
||||
pushUrl = mkOption {
|
||||
type = types.str;
|
||||
example = "ssh://...";
|
||||
|
@ -119,6 +125,10 @@ in
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
fileSystems."/var/lib/onewaysync" = mkIf (cfg.stateDirectory != "/var/lib/onewaysync") {
|
||||
device = cfg.stateDirectory;
|
||||
options = [ "bind" ];
|
||||
};
|
||||
systemd.timers = mapAttrs' (name: value: {
|
||||
name = "ows-${name}";
|
||||
value = mkSyncTimer name value;
|
||||
|
|
Loading…
Reference in a new issue