diff --git a/configs/ci.nix b/configs/ci.nix index e5d2b88..53105ab 100644 --- a/configs/ci.nix +++ b/configs/ci.nix @@ -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; diff --git a/hosts/pwntie/default.nix b/hosts/pwntie/default.nix index 51874dd..e43dc5d 100644 --- a/hosts/pwntie/default.nix +++ b/hosts/pwntie/default.nix @@ -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;