2024-07-01 17:49:32 +00:00
|
|
|
|
{
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}:
|
|
|
|
|
{
|
|
|
|
|
networking.hostName = "gerrit01";
|
|
|
|
|
# TODO: make it the default
|
|
|
|
|
networking.domain = "infra.forkos.org";
|
|
|
|
|
|
|
|
|
|
time.timeZone = "Europe/Paris";
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
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 = {
|
|
|
|
|
file = ../../secrets/ows-deploy-key.age;
|
|
|
|
|
mode = "0600";
|
|
|
|
|
owner = "git";
|
|
|
|
|
group = "git";
|
|
|
|
|
};
|
|
|
|
|
bagel.nixpkgs.one-way-sync =
|
|
|
|
|
let
|
|
|
|
|
mkNixpkgsJob = { timer, branchName }: {
|
|
|
|
|
name = "nixpkgs-${branchName}";
|
|
|
|
|
fromUri = "https://github.com/NixOS/nixpkgs";
|
|
|
|
|
fromRefspec = branchName;
|
2024-07-22 13:41:47 +00:00
|
|
|
|
localRefspec = branchName;
|
2024-07-04 13:18:21 +00:00
|
|
|
|
inherit timer;
|
|
|
|
|
};
|
|
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
|
|
pushUrl = "ssh://ows_bot@cl.forkos.org:29418/nixpkgs";
|
|
|
|
|
deployKeyPath = config.age.secrets.ows-deploy-key.path;
|
|
|
|
|
|
|
|
|
|
branches."refs/heads/master" = mkNixpkgsJob {
|
|
|
|
|
timer = "hourly";
|
|
|
|
|
branchName = "master";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
branches."refs/heads/release-24.05" = mkNixpkgsJob {
|
|
|
|
|
timer = "hourly";
|
|
|
|
|
branchName = "release-24.05";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
branches."refs/heads/release-23.11" = mkNixpkgsJob {
|
|
|
|
|
timer = "hourly";
|
|
|
|
|
branchName = "release-23.11";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Testing jobs for personal sandbox branches
|
|
|
|
|
branches."refs/heads/sandbox/raito/raito-unstable-small" = {
|
|
|
|
|
name = "raito-unstable-sync";
|
|
|
|
|
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";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
branches."refs/heads/sandbox/raito/raito-nixos-24.05" = {
|
|
|
|
|
name = "raito-release-sync";
|
|
|
|
|
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-07-01 17:49:32 +00:00
|
|
|
|
i18n.defaultLocale = "fr_FR.UTF-8";
|
|
|
|
|
|
|
|
|
|
system.stateVersion = "24.05";
|
|
|
|
|
deployment.targetHost = "gerrit01.infra.forkos.org";
|
|
|
|
|
}
|