about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2024-02-10 02:26:52 +0900
committersefidel <contact@sefidel.net>2024-02-10 07:42:17 +0900
commit5b20c2cd2d26554945b8f4c2cec27b36fdbe6f3d (patch)
treea1b74d13aee091e7128dfdf5f1e3708bedce653a
parent854fe552df5e51dd0622fd2ad48a30a31cf3665f (diff)
downloadnixrc-5b20c2cd2d26554945b8f4c2cec27b36fdbe6f3d.tar.gz
nixrc-5b20c2cd2d26554945b8f4c2cec27b36fdbe6f3d.zip
feat(hydra): initial configuration
-rw-r--r--default.nix10
-rw-r--r--flake.lock145
-rw-r--r--hydra/default.nix1
-rw-r--r--hydra/jobsets.nix34
-rw-r--r--hydra/spec.json24
5 files changed, 213 insertions, 1 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..f620865
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,10 @@
+(import
+  (
+    let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
+    fetchTarball {
+      url = lock.nodes.flake-compat.locked.url or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
+      sha256 = lock.nodes.flake-compat.locked.narHash;
+    }
+  )
+  { src = ./.; }
+).defaultNix
diff --git a/flake.lock b/flake.lock
index c9759d3..88d560d 100644
--- a/flake.lock
+++ b/flake.lock
@@ -76,6 +76,38 @@
         "type": "github"
       }
     },
+    "flake-compat_3": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1673956053,
+        "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
+        "owner": "edolstra",
+        "repo": "flake-compat",
+        "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
+        "type": "github"
+      },
+      "original": {
+        "owner": "edolstra",
+        "repo": "flake-compat",
+        "type": "github"
+      }
+    },
+    "flake-compat_4": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1696426674,
+        "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+        "owner": "edolstra",
+        "repo": "flake-compat",
+        "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
+        "type": "github"
+      },
+      "original": {
+        "owner": "edolstra",
+        "repo": "flake-compat",
+        "type": "github"
+      }
+    },
     "flake-parts": {
       "inputs": {
         "nixpkgs-lib": [
@@ -272,6 +304,26 @@
         "type": "github"
       }
     },
+    "hydra": {
+      "inputs": {
+        "nix": "nix",
+        "nixpkgs": "nixpkgs",
+        "nixpkgs-for-fileset": "nixpkgs-for-fileset"
+      },
+      "locked": {
+        "lastModified": 1706641669,
+        "narHash": "sha256-ezuVLIjasa/Kki32I3x59tr7FRJsITYTH3Xh6yznwOk=",
+        "owner": "NixOS",
+        "repo": "hydra",
+        "rev": "c1bd50a80db45930cdfc1975903d1f76cca1053a",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "repo": "hydra",
+        "type": "github"
+      }
+    },
     "impermanence": {
       "locked": {
         "lastModified": 1706639736,
@@ -287,6 +339,22 @@
         "type": "github"
       }
     },
+    "libgit2": {
+      "flake": false,
+      "locked": {
+        "lastModified": 1697646580,
+        "narHash": "sha256-oX4Z3S9WtJlwvj0uH9HlYcWv+x1hqp8mhXl7HsLu2f0=",
+        "owner": "libgit2",
+        "repo": "libgit2",
+        "rev": "45fd9ed7ae1a9b74b957ef4f337bc3c8b3df01b5",
+        "type": "github"
+      },
+      "original": {
+        "owner": "libgit2",
+        "repo": "libgit2",
+        "type": "github"
+      }
+    },
     "neovim-flake": {
       "inputs": {
         "flake-utils": "flake-utils_3",
@@ -313,7 +381,7 @@
     },
     "neovim-nightly": {
       "inputs": {
-        "flake-compat": "flake-compat_2",
+        "flake-compat": "flake-compat_4",
         "flake-parts": "flake-parts",
         "hercules-ci-effects": "hercules-ci-effects",
         "neovim-flake": "neovim-flake",
@@ -335,6 +403,31 @@
         "type": "github"
       }
     },
+    "nix": {
+      "inputs": {
+        "flake-compat": "flake-compat_3",
+        "libgit2": "libgit2",
+        "nixpkgs": [
+          "hydra",
+          "nixpkgs"
+        ],
+        "nixpkgs-regression": "nixpkgs-regression"
+      },
+      "locked": {
+        "lastModified": 1706637536,
+        "narHash": "sha256-fjx+nCOzuSxGWfhwWWc8hCsLFZAjZLDDUcbBtldRqbk=",
+        "owner": "NixOS",
+        "repo": "nix",
+        "rev": "8f42912c80c0a03f62f6a3d28a3af05a9762565d",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "ref": "2.20-maintenance",
+        "repo": "nix",
+        "type": "github"
+      }
+    },
     "nix-gaming": {
       "inputs": {
         "flake-parts": "flake-parts_3",
@@ -356,6 +449,22 @@
         "type": "github"
       }
     },
+    "nixpkgs": {
+      "locked": {
+        "lastModified": 1705033721,
+        "narHash": "sha256-K5eJHmL1/kev6WuqyqqbS1cdNnSidIZ3jeqJ7GbrYnQ=",
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "a1982c92d8980a0114372973cbdfe0a307f1bdea",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "ref": "nixos-23.05-small",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
     "nixpkgs-2311": {
       "locked": {
         "lastModified": 1707091808,
@@ -404,6 +513,22 @@
         "type": "github"
       }
     },
+    "nixpkgs-for-fileset": {
+      "locked": {
+        "lastModified": 1706098335,
+        "narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=",
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "a77ab169a83a4175169d78684ddd2e54486ac651",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "ref": "nixos-23.11",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
     "nixpkgs-lib": {
       "locked": {
         "dir": "lib",
@@ -438,6 +563,22 @@
         "type": "github"
       }
     },
+    "nixpkgs-regression": {
+      "locked": {
+        "lastModified": 1643052045,
+        "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
+        "type": "github"
+      }
+    },
     "nixpkgs-stable": {
       "locked": {
         "lastModified": 1705957679,
@@ -472,8 +613,10 @@
     "root": {
       "inputs": {
         "colmena": "colmena",
+        "flake-compat": "flake-compat_2",
         "helix": "helix",
         "home-manager": "home-manager",
+        "hydra": "hydra",
         "impermanence": "impermanence",
         "neovim-nightly": "neovim-nightly",
         "nix-gaming": "nix-gaming",
diff --git a/hydra/default.nix b/hydra/default.nix
new file mode 100644
index 0000000..b46ba3d
--- /dev/null
+++ b/hydra/default.nix
@@ -0,0 +1 @@
+{ nixrc }: (import nixrc).hydraJobs
diff --git a/hydra/jobsets.nix b/hydra/jobsets.nix
new file mode 100644
index 0000000..07c0fab
--- /dev/null
+++ b/hydra/jobsets.nix
@@ -0,0 +1,34 @@
+{ nixpkgs, ... }:
+
+let
+  pkgs = import nixpkgs {};
+
+  jobsets = {
+    main = {
+      enabled = 1;
+      hidden = false;
+      description = "main branch";
+      nixexprinput = "nixrc";
+      nixexprpath = "hydra/default.nix";
+      checkinterval = 300;
+      schedulingshares = 100;
+      enableemail = false;
+      emailoverride = "";
+      keepnr = 1;
+      inputs = {
+        nixrc = {
+          type = "git";
+          value = "https://git.exotic.sh/pub/sefidel/nixrc main";
+          emailresponsible = false;
+        };
+        nixpkgs = {
+          type = "git";
+          value = "https://github.com/NixOS/nixpkgs.git nixos-unstable";
+          emailresponsible = false;
+        };
+      };
+    };
+  };
+in {
+  jobsets = pkgs.writeText "jobsets.json" (builtins.toJSON jobsets);
+}
diff --git a/hydra/spec.json b/hydra/spec.json
new file mode 100644
index 0000000..a68a743
--- /dev/null
+++ b/hydra/spec.json
@@ -0,0 +1,24 @@
+{
+    "enabled": 1,
+    "hidden": false,
+    "description": "Jobsets",
+    "nixexprinput": "nixrc",
+    "nixexprpath": "hydra/jobsets.nix",
+    "checkinterval": 300,
+    "schedulingshares": 100,
+    "enableemail": false,
+    "emailoverride": "",
+    "keepnr": 1,
+    "inputs": {
+        "nixrc": {
+            "type": "git",
+            "value": "https://git.exotic.sh/pub/sefidel/nixrc main",
+            "emailresponsible": false
+        },
+        "nixpkgs": {
+            "type": "git",
+            "value": "https://github.com/NixOS/nixpkgs.git nixos-unstable",
+            "emailresponsible": false
+        }
+    }
+}