diff --git a/hosts/gerrit01/default.nix b/hosts/gerrit01/default.nix index 085dce7..6f25c9c 100755 --- a/hosts/gerrit01/default.nix +++ b/hosts/gerrit01/default.nix @@ -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; diff --git a/services/gerrit/one-way-sync.nix b/services/gerrit/one-way-sync.nix index 39570b0..b0a5ef8 100644 --- a/services/gerrit/one-way-sync.nix +++ b/services/gerrit/one-way-sync.nix @@ -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;