summaryrefslogtreecommitdiff
path: root/parts
diff options
context:
space:
mode:
Diffstat (limited to 'parts')
-rw-r--r--parts/ci.nix78
-rw-r--r--parts/default.nix1
2 files changed, 0 insertions, 79 deletions
diff --git a/parts/ci.nix b/parts/ci.nix
deleted file mode 100644
index d2434e8..0000000
--- a/parts/ci.nix
+++ /dev/null
@@ -1,78 +0,0 @@
-{
- config,
- inputs,
- self,
- withSystem,
- ...
-}: let
- ciSystems = [
- "x86_64-linux"
- "aarch64-linux"
- ];
-in {
- imports = [
- inputs.effects.flakeModule
- ];
-
- herculesCI = {lib, ...} @ herculesCI: {
- inherit ciSystems;
-
- onPush.default = let
- inherit (builtins) elem;
- inherit (lib) filterAttrs mapAttrs mkForce;
-
- amd64 = ["x86_64-linux"];
-
- findCompatible = systems: filterAttrs (s: _: elem s systems);
- findCompatibleCfgs = systems: filterAttrs (_: v: elem v.pkgs.system systems);
- buildCfgs = mapAttrs (_: v: v.config.system.build.toplevel);
- buildHMUsers = mapAttrs (_: v: v.activationPackage);
- #evalCfgs = mapAttrs (_: v: seq v.config.system.build.toplevel v.pkgs.emptyFile);
- in
- mkForce {
- outputs = {
- checks = findCompatible amd64 self.checks;
- devShells = findCompatible amd64 self.devShells;
- homeConfigurations = buildHMUsers (findCompatibleCfgs amd64 self.homeConfigurations);
- nixosConfigurations = buildCfgs (findCompatibleCfgs ciSystems self.nixosConfigurations);
- };
- };
-
- onSchedule = let
- when = {
- hour = [0];
- minute = 0;
- };
-
- mkUpdateEffect = inputs: pullRequestTitle: let
- cfg = config.hercules-ci.flake-update;
- in
- withSystem cfg.effect.system ({hci-effects, ...}:
- hci-effects.flakeUpdate {
- gitRemote = herculesCI.config.repo.remoteHttpUrl;
- user = "x-access-token";
- autoMergeMethod = "rebase";
- commitSummary = pullRequestTitle;
- module = cfg.effect.settings;
- inherit pullRequestTitle inputs;
- inherit (cfg) updateBranch forgeType createPullRequest pullRequestBody;
- });
- in {
- nixpkgs-update = {
- inherit when;
-
- outputs.effects = {
- nixpkgs-update = mkUpdateEffect ["nixpkgs" "nixpkgs-stable"] "flake: update nixpkgs inputs";
- };
- };
-
- flake-update = {
- when = when // {dayOfMonth = [1 8 15 22 29];};
-
- outputs.effects = {
- flake-update = mkUpdateEffect [] "flake: update all inputs";
- };
- };
- };
- };
-}
diff --git a/parts/default.nix b/parts/default.nix
index c382e21..3626f4a 100644
--- a/parts/default.nix
+++ b/parts/default.nix
@@ -1,6 +1,5 @@
_: {
imports = [
- ./ci.nix
./deploy.nix
./dev.nix
./lib