summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/ci.nix25
-rw-r--r--nix/deployment.nix4
-rw-r--r--nix/workflow.nix15
3 files changed, 26 insertions, 18 deletions
diff --git a/nix/ci.nix b/nix/ci.nix
new file mode 100644
index 0000000..38293ce
--- /dev/null
+++ b/nix/ci.nix
@@ -0,0 +1,25 @@
+{
+ perSystem = {
+ pkgs,
+ lib,
+ config,
+ ...
+ }: {
+ /*
+ require packages, checks, and devShells for ci to be considered a success
+
+ also thanks DetSys for showing me i don't need to use runCommand, symlinkJoin, or linkFarm!
+ https://determinate.systems/posts/hydra-deployment-source-of-truth
+ */
+
+ packages.ciGate = pkgs.writeText "ci-gate" ''
+ ${
+ lib.concatMapStringsSep "\n" (s: toString (builtins.attrValues s)) [
+ config.checks
+ config.devShells
+ (builtins.removeAttrs config.packages ["default" "ciGate"])
+ ]
+ }
+ '';
+ };
+}
diff --git a/nix/deployment.nix b/nix/deployment.nix
index 9fb754e..57bc67a 100644
--- a/nix/deployment.nix
+++ b/nix/deployment.nix
@@ -13,8 +13,6 @@
inputs',
...
}: let
- name = "getchoo/teawiebot";
-
crossPkgsFor = lib.fix (finalAttrs: {
"x86_64-linux" = {
"x86_64" = pkgs.pkgsStatic;
@@ -70,7 +68,7 @@
containerFor = arch:
pkgs.dockerTools.buildLayeredImage {
- inherit name;
+ name = "teawiebot";
tag = "latest-${arch}";
contents = [pkgs.dockerTools.caCertificates];
config.Cmd = [(wieFor arch)];
diff --git a/nix/workflow.nix b/nix/workflow.nix
deleted file mode 100644
index 600a1bb..0000000
--- a/nix/workflow.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- githubWorkflowGenerator = {
- outputs = [
- "checks"
- "devShells"
- "packages"
- ];
-
- overrides = {
- checks.systems = ["x86_64-linux"];
- devShells.systems = ["x86_64-linux"];
- packages.systems = ["x86_64-linux"];
- };
- };
-}