Compare commits

..

2 commits

Author SHA1 Message Date
raito 980709cc02 chore(ows): remove Raito personal sandbox branches
I am not using those branches anymore, we can remove them.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-12-14 14:42:22 +00:00
raito 112f60afd1 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>
2024-12-14 14:42:22 +00:00
2 changed files with 12 additions and 15 deletions

View file

@ -61,6 +61,8 @@
{ {
enable = true; enable = true;
stateDirectory = "/gerrit-data/ows";
pushUrl = "ssh://ows_bot@cl.forkos.org:29418/nixpkgs"; pushUrl = "ssh://ows_bot@cl.forkos.org:29418/nixpkgs";
deployKeyPath = config.age.secrets.ows-deploy-key.path; deployKeyPath = config.age.secrets.ows-deploy-key.path;
@ -107,21 +109,6 @@
timer = "hourly"; timer = "hourly";
fromRefspec = "staging-23.11"; fromRefspec = "staging-23.11";
}; };
# Testing jobs for personal sandbox branches
branches."raito-unstable-sync" = {
fromUri = "https://github.com/NixOS/nixpkgs";
fromRefspec = "nixos-unstable-small";
localRefspec = "sandbox/raito/raito-unstable-small";
timer = "*-*-* 12:00:00";
};
branches."raito-release-sync" = {
fromUri = "https://github.com/NixOS/nixpkgs";
fromRefspec = "nixos-24.05";
localRefspec = "sandbox/raito/raito-nixos-24.05";
timer = "daily";
};
}; };
age.secrets.s3-channel-staging-keys.file = ../../secrets/floral/s3-channel-staging-keys.age; age.secrets.s3-channel-staging-keys.file = ../../secrets/floral/s3-channel-staging-keys.age;

View file

@ -71,6 +71,12 @@ in
description = "Working directory for the service"; 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 { pushUrl = mkOption {
type = types.str; type = types.str;
example = "ssh://..."; example = "ssh://...";
@ -119,6 +125,10 @@ in
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
fileSystems."/var/lib/onewaysync" = mkIf (cfg.stateDirectory != "/var/lib/onewaysync") {
device = cfg.stateDirectory;
options = [ "bind" ];
};
systemd.timers = mapAttrs' (name: value: { systemd.timers = mapAttrs' (name: value: {
name = "ows-${name}"; name = "ows-${name}";
value = mkSyncTimer name value; value = mkSyncTimer name value;