diff --git a/hosts/algiz/caddy/index.html b/hosts/algiz/caddy/attic/index.html similarity index 100% rename from hosts/algiz/caddy/index.html rename to hosts/algiz/caddy/attic/index.html diff --git a/hosts/algiz/caddy/nix-cache/daylin-nix-cache-logo.svg b/hosts/algiz/caddy/nix-cache/daylin-nix-cache-logo.svg new file mode 100644 index 0000000..43e7709 --- /dev/null +++ b/hosts/algiz/caddy/nix-cache/daylin-nix-cache-logo.svg @@ -0,0 +1,439 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hosts/algiz/caddy/nix-cache/index.html b/hosts/algiz/caddy/nix-cache/index.html new file mode 100644 index 0000000..51e9a79 --- /dev/null +++ b/hosts/algiz/caddy/nix-cache/index.html @@ -0,0 +1,64 @@ + + + + + + Daylin's Nix binary cache + + + + + + +
+
+
+

+ This service, provides a "binary cache" for the + Nix package manager +

+
+
+
+
+
+

Cache Info

+

Store Dir: /nix/store

+

Want Mass Query: 1

+

Priority: 30

+
+
+
+
+
+ + Powered by + harmonia + +
+
+
+ + diff --git a/hosts/algiz/services.nix b/hosts/algiz/services.nix index 7cfd3d8..fa8bd19 100644 --- a/hosts/algiz/services.nix +++ b/hosts/algiz/services.nix @@ -7,10 +7,14 @@ let atticPort = "5656"; harmoniaPort = "5657"; - static = pkgs.runCommandLocal "static-files" { } '' + static-attic = pkgs.runCommandLocal "static-files" { } '' mkdir $out cp ${./caddy/index.html} $out/index.html ''; + static-nix-cache = pkgs.runCommandLocal "static-files-nix-cache" { } '' + mkdir $out + cp -r ${./caddy/nix-cache} $out + ''; check-attic = pkgs.writeShellScriptBin "check-attic" '' sudo du -sh /var/lib/atticd/ @@ -86,7 +90,7 @@ in redir /oizys / handle / { - root * ${static} + root * ${static-attic} file_server } @@ -96,7 +100,13 @@ in ''; "nix-cache.dayl.in".extraConfig = '' - reverse_proxy http://localhost:${harmoniaPort} + handle / { + root * ${static-nix-cache} + file_server + } + handle /* { + reverse_proxy http://localhost:${harmoniaPort} + } ''; }; };