From 427a9057999e57683f4fed45d49ed04215591f38 Mon Sep 17 00:00:00 2001 From: javalsai Date: Mon, 4 May 2026 04:55:58 +0200 Subject: [PATCH] nixos/services: add default website on nginx --- nixos/modules/nginx.nix | 18 ++++++++++++------ npins/sources.json | 15 ++++++++++++++- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/nixos/modules/nginx.nix b/nixos/modules/nginx.nix index 9d1dbbc..e6e5f53 100644 --- a/nixos/modules/nginx.nix +++ b/nixos/modules/nginx.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ config, self, ... }: let inherit (config.networking) fqdn; @@ -32,11 +32,17 @@ in recommendedGzipSettings = true; recommendedOptimisation = true; - # services.nginx.virtualHosts."${fqdn}" = { - # addSSL = true; - # root = "/var/www/myhost.org"; - # default = true; - # }; + virtualHosts."${fqdn}" = mkVhost { + default = true; + + locations."/" = { + root = "${self.pins.website}/web-root"; + + extraConfig = '' + ssi on; + ''; + }; + }; virtualHosts."git.${fqdn}" = mkVhost { locations."/" = mkProxy config.services.gitea.settings.server.HTTP_PORT; diff --git a/npins/sources.json b/npins/sources.json index 23077e6..a4631c6 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -1,4 +1,17 @@ { - "pins": {}, + "pins": { + "website": { + "type": "Git", + "repository": { + "type": "Git", + "url": "https://git.javalsai.tuxcord.net/tuxcord/website.git" + }, + "branch": "main", + "submodules": false, + "revision": "a9f523c268062c0c4a8167b719be15e3e4b3ef88", + "url": null, + "hash": "0ql14xjz0prvy3rdx6zkbpsjxvx40ivdzrwzdgfsk07jg07aki05" + } + }, "version": 5 }