about summary refs log tree commit diff stats
path: root/nix/default.nix
diff options
context:
space:
mode:
authorAlan Pearce2024-04-21 20:50:10 +0200
committerAlan Pearce2024-04-21 21:49:21 +0200
commita10c8466b4bf81f9ddd356a2da90e8e5e9b360a5 (patch)
tree63a4182a2a3d8e847609f42c5dbe497cda25379e /nix/default.nix
parentbbda985b3aec721a7d972d76780ca981140f6f3c (diff)
downloadwebsite-a10c8466b4bf81f9ddd356a2da90e8e5e9b360a5.tar.lz
website-a10c8466b4bf81f9ddd356a2da90e8e5e9b360a5.tar.zst
website-a10c8466b4bf81f9ddd356a2da90e8e5e9b360a5.zip
split output directories into website/{public,private}
Diffstat (limited to 'nix/default.nix')
-rw-r--r--nix/default.nix20
1 files changed, 10 insertions, 10 deletions
diff --git a/nix/default.nix b/nix/default.nix
index 32c546f..1ee61a2 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -2,7 +2,7 @@
 let
   version = self.shortRev or self.dirtyShortRev or "unstable-${self.lastModified}";
   dockerTag = self.rev or self.dirtyRev or "unstable-${self.lastModified}";
-  mkDocker = type: { server, public }:
+  mkDocker = type: { server, website }:
     let
       PORT = 3000;
     in
@@ -11,7 +11,7 @@ let
       tag = dockerTag;
       contents = [
         (pkgs.writeTextDir "config.toml" (builtins.readFile ./../config.toml))
-        public
+        website
       ];
       config = {
         Cmd = [ "${server}/bin/server" ];
@@ -46,7 +46,7 @@ with pkgs; rec {
     modules = ./gomod2nix.toml;
     subPackages = [ "cmd/build" ];
   };
-  public = runCommandLocal "build"
+  website = runCommandLocal "build"
     {
       src = with lib.fileset; toSource {
         root = ./..;
@@ -58,7 +58,7 @@ with pkgs; rec {
         ];
       };
     } ''
-    ${builder}/bin/build -s $src -d $out/public
+    ${builder}/bin/build -s $src -d $out/website
   '';
   server = buildGoApplication {
     pname = "server";
@@ -76,18 +76,18 @@ with pkgs; rec {
     modules = ./gomod2nix.toml;
     ldflags = [ "-s" "-w" "-X" "main.Commit=${version}" ];
   };
-  docker-stream = mkDockerStream { inherit server public; };
+  docker-stream = mkDockerStream { inherit server website; };
   docker-stream-aarch64-linux = mkDockerStream {
-    inherit public; server = (self.packages.aarch64-linux.server);
+    inherit website; server = (self.packages.aarch64-linux.server);
   };
   docker-stream-x86_64-linux = mkDockerStream {
-    inherit public; server = (self.packages.x86_64-linux.server);
+    inherit website; server = (self.packages.x86_64-linux.server);
   };
-  docker-image = mkDockerImage { inherit server public; };
+  docker-image = mkDockerImage { inherit server website; };
   docker-image-aarch64-linux = mkDockerImage {
-    inherit public; server = (self.packages.aarch64-linux.server);
+    inherit website; server = (self.packages.aarch64-linux.server);
   };
   docker-image-x86_64-linux = mkDockerImage {
-    inherit public; server = (self.packages.x86_64-linux.server);
+    inherit website; server = (self.packages.x86_64-linux.server);
   };
 }