From d4b710d0ce3e6e1642e7658971da62c3a1476236 Mon Sep 17 00:00:00 2001 From: Soispha Date: Sat, 17 Jun 2023 21:10:57 +0200 Subject: Fix(system/services/nginx): Switch to git-sync --- .gitattributes | 1 + flake.nix | 11 +---------- system/services/nginx/default.nix | 12 ++++-------- system/services/nginx/hosts.nix | Bin 0 -> 630 bytes 4 files changed, 6 insertions(+), 18 deletions(-) create mode 100644 system/services/nginx/hosts.nix diff --git a/.gitattributes b/.gitattributes index 386aea7..a69acc8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ system/mail/users.nix filter=git-crypt diff=git-crypt +system/services/nginx/hosts.nix filter=git-crypt diff=git-crypt diff --git a/flake.nix b/flake.nix index 11312c7..3af5b41 100644 --- a/flake.nix +++ b/flake.nix @@ -1,4 +1,3 @@ -# vim: ts=2 { description = "Nixos server config"; @@ -17,21 +16,12 @@ nixpkgs.follows = "nixpkgs"; }; }; - websites = { - url = "git+https://codeberg.org/vhack.eu/website.git"; - inputs = { - nixpkgs.follows = "nixpkgs"; - systems.follows = "systems"; - flake-utils.follows = "flake-utils"; - }; - }; }; outputs = { self, nixpkgs, simple-nixos-mailserver, - websites, ... } @ attrs: let system = "x86_64-linux"; @@ -63,3 +53,4 @@ }; }; } +# vim: ts=2 diff --git a/system/services/nginx/default.nix b/system/services/nginx/default.nix index 406f2a1..6753fb0 100644 --- a/system/services/nginx/default.nix +++ b/system/services/nginx/default.nix @@ -1,15 +1,11 @@ -{websites, ...}: { +{...}: { + imports = [ + ./hosts.nix + ]; networking.firewall = { allowedTCPPorts = [80 443]; }; services.nginx = { enable = true; - virtualHosts = { - "vhack.eu" = { - forceSSL = true; - enableACME = true; - root = "${websites}/websites/vhack.eu"; - }; - }; }; } diff --git a/system/services/nginx/hosts.nix b/system/services/nginx/hosts.nix new file mode 100644 index 0000000..684bb68 Binary files /dev/null and b/system/services/nginx/hosts.nix differ -- cgit 1.4.1