aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Jesus <adbjesus@gmail.com>2022-08-29 23:23:28 +0100
committerAlexandre Jesus <adbjesus@gmail.com>2022-08-29 23:23:28 +0100
commit68761b60e98d4e43105a70d53d7a5044473a0b18 (patch)
treeeb78cd3dbffa3979db3f717b418dace402c0a78f
parentdbfe642280c043e129752c488aa8c14159071281 (diff)
downloadwebsite-68761b60e98d4e43105a70d53d7a5044473a0b18.tar.gz
website-68761b60e98d4e43105a70d53d7a5044473a0b18.zip
Fix in nix code of 01-hello-world blog post
-rw-r--r--content/blog/01-hello-world/index.md12
-rw-r--r--content/blog/01-hello-world/index.org12
2 files changed, 6 insertions, 18 deletions
diff --git a/content/blog/01-hello-world/index.md b/content/blog/01-hello-world/index.md
index e0aaefe..0bdb3d0 100644
--- a/content/blog/01-hello-world/index.md
+++ b/content/blog/01-hello-world/index.md
@@ -171,19 +171,13 @@ inputs.website = {
and use the `nginx.virtualHosts` option to deploy it:
``` nix
-nginx.virtualHosts = {
+services.nginx.virtualHosts = {
"adbjesus.com" = {
default = true;
forceSSL = true;
enableACME = true;
- locations = {
- "/" = {
- root = "${inputs.website.packages.${system}.website}/public";
- extraConfig = ''
- add_header Last-Modified "${toDateTime inputs.website.lastModified}";
- add_header Cache-Control max-age="${toString (60 * 60 * 24)}";
- '';
- };
+ locations."/" = {
+ root = "${website.packages.x86_64-linux.website}/public";
};
};
};
diff --git a/content/blog/01-hello-world/index.org b/content/blog/01-hello-world/index.org
index aa51773..02676c5 100644
--- a/content/blog/01-hello-world/index.org
+++ b/content/blog/01-hello-world/index.org
@@ -168,19 +168,13 @@ inputs.website = {
and use the =nginx.virtualHosts= option to deploy it:
#+begin_src nix
-nginx.virtualHosts = {
+services.nginx.virtualHosts = {
"adbjesus.com" = {
default = true;
forceSSL = true;
enableACME = true;
- locations = {
- "/" = {
- root = "${inputs.website.packages.${system}.website}/public";
- extraConfig = ''
- add_header Last-Modified "${toDateTime inputs.website.lastModified}";
- add_header Cache-Control max-age="${toString (60 * 60 * 24)}";
- '';
- };
+ locations."/" = {
+ root = "${website.packages.x86_64-linux.website}/public";
};
};
};