about summary refs log tree commit diff stats
path: root/flake.nix
diff options
context:
space:
mode:
authorAlan Pearce2023-07-01 09:50:37 +0200
committerAlan Pearce2023-07-01 09:50:37 +0200
commitf94321a27b8ef36423445b021f53593cb46a9864 (patch)
tree7a5e2cb6396dcc4d5207b110bcf9f93b7b46e22e /flake.nix
parent57e251e122e0f0d54c90103380aa83f80f0651fb (diff)
downloadwebsite-f94321a27b8ef36423445b021f53593cb46a9864.tar.lz
website-f94321a27b8ef36423445b021f53593cb46a9864.tar.zst
website-f94321a27b8ef36423445b021f53593cb46a9864.zip
Don't try to cross-build docker images with nix
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix30
1 files changed, 3 insertions, 27 deletions
diff --git a/flake.nix b/flake.nix
index ac16a59..bbc1329 100644
--- a/flake.nix
+++ b/flake.nix
@@ -40,33 +40,9 @@
                 cp Caddyfile $out/
               '';
             };
-            docker = pkgs.dockerTools.buildImage {
-              name = "alanpearce/website";
-              fromImage = pkgs.dockerTools.pullImage {
-                imageName = "caddy";
-                finalImageName = "caddy";
-                finalImageTag = "2-alpine";
-                imageDigest = "sha256:d4ca216d8dc515a49bc20fa22a449283ade6c8fc132eb6fa412ff351664d4917";
-                sha256 = "auFzOG+6PSOVNXXXsRsEEThtIHJYM3JUkMQGcUt4cNQ=";
-              };
-              created = flockenzeit.lib.ISO-8601 self.lastModified;
-              copyToRoot = pkgs.buildEnv {
-                name = "website";
-                paths = with pkgs; [
-                  packages.default
-                  nss.tools
-                ];
-                pathsToLink = [ "/bin" "/public" ];
-              };
-              config = {
-                WorkingDir = "${packages.default}";
-                ExposedPorts = {
-                  "80/tcp" = { };
-                };
-                Volumes = {
-                  "/data" = { };
-                };
-              };
+            docker = import ./docker.nix {
+              inherit self pkgs flockenzeit;
+              website = packages.default;
             };
           };
           devShell = pkgs.mkShell {