2023-08-17 14:16:17 +00:00
|
|
|
# Deploying to nginx webserver
|
|
|
|
|
2023-08-17 15:07:46 +00:00
|
|
|
Adapted from [AveryanAlex's blog](https://averyan.ru/en/p/nix-flakes-hugo)
|
|
|
|
|
2023-08-17 14:16:17 +00:00
|
|
|
```nix
|
2023-08-17 15:07:46 +00:00
|
|
|
{
|
|
|
|
inputs.blog.url = "git+https://git.krsnik.at/Kristian/blog"
|
|
|
|
}
|
|
|
|
```
|
2023-08-17 14:16:17 +00:00
|
|
|
|
2023-08-17 15:07:46 +00:00
|
|
|
Setup nginx virtualHost to serve your site:
|
|
|
|
|
|
|
|
```nix
|
|
|
|
{ inputs, pkgs, ... }:
|
|
|
|
{
|
|
|
|
services.nginx.virtualHosts."blog.krsnik.at" = {
|
|
|
|
root = inputs.packages.default.${pkgs.hostPlatform.system};
|
|
|
|
ssl = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
2023-08-17 14:16:17 +00:00
|
|
|
```
|