diff options
| author | seth <[email protected]> | 2023-12-16 00:34:10 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-12-16 11:29:01 -0500 |
| commit | 51c97f77ae11d4eb8e5c38a9f5d0b5ca9d8e3da4 (patch) | |
| tree | 7a7e32f0ff01549252fb205886c602f919c8b211 /nix | |
| parent | bd2966db8f3660c03039a0f6ab03e850f0e17d45 (diff) | |
ci: back to garnix
Diffstat (limited to 'nix')
| -rw-r--r-- | nix/ci.nix | 25 | ||||
| -rw-r--r-- | nix/deployment.nix | 4 | ||||
| -rw-r--r-- | nix/workflow.nix | 15 |
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"]; - }; - }; -} |
