2024-07-01 17:49:32 +00:00
|
|
|
|
{
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}:
|
|
|
|
|
{
|
|
|
|
|
networking.hostName = "gerrit01";
|
|
|
|
|
# TODO: make it the default
|
|
|
|
|
networking.domain = "infra.forkos.org";
|
|
|
|
|
|
|
|
|
|
bagel.sysadmin.enable = true;
|
|
|
|
|
# Gerrit is proxied.
|
|
|
|
|
bagel.raito.v6-proxy-awareness.enable = true;
|
|
|
|
|
bagel.hardware.raito-vm = {
|
|
|
|
|
enable = true;
|
|
|
|
|
networking = {
|
|
|
|
|
nat-lan-mac = "bc:24:11:f7:29:6c";
|
|
|
|
|
wan = {
|
|
|
|
|
address = "2001:bc8:38ee:100:1000::10/64";
|
|
|
|
|
mac = "bc:24:11:4a:9d:32";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/gerrit-data" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/d1062305-0dea-4740-9a27-b6b1691862a4";
|
|
|
|
|
fsType = "ext4";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
bagel.services.gerrit = {
|
|
|
|
|
enable = true;
|
2024-08-23 18:49:37 +00:00
|
|
|
|
pyroscope.enable = true;
|
2024-07-01 17:49:32 +00:00
|
|
|
|
domains = [
|
|
|
|
|
"cl.forkos.org"
|
|
|
|
|
];
|
2024-07-17 13:43:22 +00:00
|
|
|
|
canonicalDomain = "cl.forkos.org";
|
2024-07-01 17:49:32 +00:00
|
|
|
|
data = "/gerrit-data";
|
|
|
|
|
};
|
|
|
|
|
|
2024-07-04 13:18:21 +00:00
|
|
|
|
age.secrets.ows-deploy-key = {
|
2024-10-05 16:03:41 +00:00
|
|
|
|
file = ../../secrets/floral/ows-deploy-key.age;
|
2024-07-04 13:18:21 +00:00
|
|
|
|
mode = "0600";
|
|
|
|
|
owner = "git";
|
|
|
|
|
group = "git";
|
|
|
|
|
};
|
|
|
|
|
bagel.nixpkgs.one-way-sync =
|
|
|
|
|
let
|
2024-08-08 13:16:04 +00:00
|
|
|
|
mkNixpkgsJob = { timer, fromRefspec, localRefspec ? fromRefspec }: {
|
2024-07-04 13:18:21 +00:00
|
|
|
|
fromUri = "https://github.com/NixOS/nixpkgs";
|
2024-08-08 13:16:04 +00:00
|
|
|
|
inherit fromRefspec localRefspec timer;
|
|
|
|
|
};
|
|
|
|
|
mkLocalJob = { timer, fromRefspec, localRefspec }: {
|
|
|
|
|
fromUri = "https://cl.forkos.org/nixpkgs";
|
|
|
|
|
inherit fromRefspec localRefspec timer;
|
2024-07-04 13:18:21 +00:00
|
|
|
|
};
|
|
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
|
|
pushUrl = "ssh://ows_bot@cl.forkos.org:29418/nixpkgs";
|
|
|
|
|
deployKeyPath = config.age.secrets.ows-deploy-key.path;
|
|
|
|
|
|
2024-08-08 13:16:04 +00:00
|
|
|
|
# Sync main -> staging-next -> staging
|
|
|
|
|
branches."main-to-staging-next" = mkLocalJob {
|
2024-08-08 13:22:44 +00:00
|
|
|
|
timer = "00/8:20:00"; # every 8 hours, 20 minutes past the full hour
|
2024-08-08 13:16:04 +00:00
|
|
|
|
fromRefspec = "main";
|
|
|
|
|
localRefspec = "staging-next";
|
|
|
|
|
};
|
|
|
|
|
branches."staging-next-to-staging" = mkLocalJob {
|
2024-08-08 13:22:44 +00:00
|
|
|
|
timer = "00/8:40:00"; # every 8 hours, 40 minutes past the full hour
|
2024-08-08 13:16:04 +00:00
|
|
|
|
fromRefspec = "staging-next";
|
|
|
|
|
localRefspec = "staging";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Sync nixpkgs -> fork
|
|
|
|
|
branches."nixpkgs-master" = mkNixpkgsJob {
|
2024-07-04 13:18:21 +00:00
|
|
|
|
timer = "hourly";
|
2024-08-08 13:16:04 +00:00
|
|
|
|
fromRefspec = "master";
|
2024-07-25 21:35:06 +00:00
|
|
|
|
localRefspec = "main";
|
2024-07-04 13:18:21 +00:00
|
|
|
|
};
|
|
|
|
|
|
2024-08-08 13:16:04 +00:00
|
|
|
|
branches."nixpkgs-staging" = mkNixpkgsJob {
|
2024-07-23 09:14:17 +00:00
|
|
|
|
timer = "hourly";
|
2024-08-08 13:16:04 +00:00
|
|
|
|
fromRefspec = "staging";
|
2024-07-23 09:14:17 +00:00
|
|
|
|
};
|
|
|
|
|
|
2024-08-08 13:16:04 +00:00
|
|
|
|
branches."nixpkgs-release-24.05" = mkNixpkgsJob {
|
2024-07-04 13:18:21 +00:00
|
|
|
|
timer = "hourly";
|
2024-08-08 13:16:04 +00:00
|
|
|
|
fromRefspec = "release-24.05";
|
2024-07-04 13:18:21 +00:00
|
|
|
|
};
|
|
|
|
|
|
2024-08-08 13:16:04 +00:00
|
|
|
|
branches."nixpkgs-staging-24.05" = mkNixpkgsJob {
|
2024-07-23 09:14:17 +00:00
|
|
|
|
timer = "hourly";
|
2024-08-08 13:16:04 +00:00
|
|
|
|
fromRefspec = "staging-24.05";
|
2024-07-23 09:14:17 +00:00
|
|
|
|
};
|
|
|
|
|
|
2024-08-08 13:16:04 +00:00
|
|
|
|
branches."nixpkgs-release-23.11" = mkNixpkgsJob {
|
2024-07-04 13:18:21 +00:00
|
|
|
|
timer = "hourly";
|
2024-08-08 13:16:04 +00:00
|
|
|
|
fromRefspec = "release-23.11";
|
2024-07-04 13:18:21 +00:00
|
|
|
|
};
|
|
|
|
|
|
2024-08-08 13:16:04 +00:00
|
|
|
|
branches."nixpkgs-staging-23.11" = mkNixpkgsJob {
|
2024-07-23 09:14:17 +00:00
|
|
|
|
timer = "hourly";
|
2024-08-08 13:16:04 +00:00
|
|
|
|
fromRefspec = "staging-23.11";
|
2024-07-23 09:14:17 +00:00
|
|
|
|
};
|
|
|
|
|
|
2024-07-04 13:18:21 +00:00
|
|
|
|
# Testing jobs for personal sandbox branches
|
2024-08-08 13:16:04 +00:00
|
|
|
|
branches."raito-unstable-sync" = {
|
2024-07-04 13:18:21 +00:00
|
|
|
|
fromUri = "https://github.com/NixOS/nixpkgs";
|
|
|
|
|
fromRefspec = "nixos-unstable-small";
|
2024-07-22 13:41:47 +00:00
|
|
|
|
localRefspec = "sandbox/raito/raito-unstable-small";
|
2024-07-04 13:18:21 +00:00
|
|
|
|
timer = "*-*-* 12:00:00";
|
|
|
|
|
};
|
|
|
|
|
|
2024-08-08 13:16:04 +00:00
|
|
|
|
branches."raito-release-sync" = {
|
2024-07-04 13:18:21 +00:00
|
|
|
|
fromUri = "https://github.com/NixOS/nixpkgs";
|
|
|
|
|
fromRefspec = "nixos-24.05";
|
2024-07-22 13:41:47 +00:00
|
|
|
|
localRefspec = "sandbox/raito/raito-nixos-24.05";
|
2024-07-04 13:18:21 +00:00
|
|
|
|
timer = "daily";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-10-06 19:20:08 +00:00
|
|
|
|
age.secrets.s3-channel-staging-keys.file = ../../secrets/floral/s3-channel-staging-keys.age;
|
2024-08-01 22:33:42 +00:00
|
|
|
|
bagel.nixpkgs.channel-scripts = {
|
|
|
|
|
enable = true;
|
|
|
|
|
otlp.enable = true;
|
|
|
|
|
nixpkgsUrl = "https://cl.forkos.org/nixpkgs.git";
|
|
|
|
|
hydraUrl = "https://hydra.forkos.org";
|
|
|
|
|
binaryCacheUrl = "https://cache.forkos.org";
|
|
|
|
|
baseUriForGitRevisions = "https://cl.forkos.org/plugins/gitiles/nixpkgs/+";
|
|
|
|
|
s3 = {
|
|
|
|
|
release = "bagel-channel-scripts-test";
|
|
|
|
|
channel = "bagel-channel-scripts-test";
|
|
|
|
|
};
|
|
|
|
|
releaseBucketCredentialsFile = config.age.secrets.s3-channel-staging-keys.path;
|
|
|
|
|
deployKeyFile = config.age.secrets.priv-ssh-key.path;
|
|
|
|
|
extraArgs = [
|
|
|
|
|
"--bypass-preflight-checks"
|
|
|
|
|
];
|
|
|
|
|
channels = import ../../common/channels.nix;
|
|
|
|
|
};
|
|
|
|
|
|
2024-07-01 17:49:32 +00:00
|
|
|
|
i18n.defaultLocale = "fr_FR.UTF-8";
|
|
|
|
|
|
|
|
|
|
system.stateVersion = "24.05";
|
|
|
|
|
deployment.targetHost = "gerrit01.infra.forkos.org";
|
|
|
|
|
}
|