ci: move all the job scheduling to the ci module, add an update task

- run a build every hour
- run an update daily
This commit is contained in:
Aaron Bieber 2023-02-02 11:49:18 -07:00
parent a6e80a224f
commit 9782963437
No known key found for this signature in database
2 changed files with 20 additions and 14 deletions

View File

@ -1,5 +1,20 @@
{ config, lib, pkgs, inputs, ... }:
with lib; {
{ config, lib, pkgs, inputs, xinlib, ... }:
let
jobs = [
{
name = "xin-ci-update";
script = "cd ~/src/xin && ./ci update";
startAt = "daily";
path = [ ];
}
{
name = "xin-ci";
script = "cd ~/src/xin && ./ci";
startAt = "hourly";
path = [ ];
}
];
in with lib; {
options = {
xinCI = {
enable = mkEnableOption "Configure host as a xin CI host.";
@ -47,9 +62,9 @@ with lib; {
settings.allowed-users = [ "root" config.xinCI.user "nix-serve" ];
};
# TODOs
# - Service to fire off ./ci
# - Git config for signing
systemd.user.services =
lib.listToAttrs (builtins.map xinlib.jobToService jobs);
services = {
tsrevprox = {
enable = true;

View File

@ -5,12 +5,6 @@ let
pubKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7v+/xS8832iMqJHCWsxUZ8zYoMWoZhjj++e26g1fLT europa"
];
jobs = [{
name = "xin-ci";
script = "cd ~/src/xin && ./ci update";
startAt = "daily";
path = [ ];
}];
in {
_module.args.isUnstable = true;
imports = [ ./hardware-configuration.nix ];
@ -21,9 +15,6 @@ in {
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.kernelPackages = pkgs.linuxPackages_latest;
systemd.user.services =
lib.listToAttrs (builtins.map xinlib.jobToService jobs);
networking = {
hostName = "pwntie";
networkmanager.enable = true;