diff options
author | Katharina Fey <kookie@spacekookie.de> | 2019-11-28 13:50:47 +0100 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2019-11-28 13:50:47 +0100 |
commit | 3a8f3350b7dd99de2f86a1a96a877b71f67757a0 (patch) | |
tree | 70feb0621019b8df9b4412512c4fe82ae04c8d71 /modules/server/blog/default.nix | |
parent | 293d432cab89f6594f71990ac1d7c051a2ebb012 (diff) |
server/blog: init virtualhosts config
Diffstat (limited to '')
-rw-r--r-- | modules/server/blog/default.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/modules/server/blog/default.nix b/modules/server/blog/default.nix new file mode 100644 index 00000000000..8a68302116d --- /dev/null +++ b/modules/server/blog/default.nix @@ -0,0 +1,30 @@ +/* SPACEKOOKIE.DE BLOG WEBSITE + * + * Static website built with pelican and nix + */ + +{ pkgs, ... }: + +let + webpkg = pkgs.spacekookie-de; +in +{ + services.nginx.virtualHosts."spacekookie.de" = { + serverAliases = [ "www.spacekookie.de" ]; + enableACME = true; + forceSSL = true; + locations."/" = { + root = webpkg; + index = "index.html"; + }; + + # Provide the `downloads` directory from the store + # TODO: Improve this to be more updatable + locations."/downloads/" = { + root = webpkg; + extraConfig = '' + autoindex on; + ''; + }; + }; +} |