summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--flake.lock72
-rw-r--r--flake.nix16
-rw-r--r--system/services/nginx/default.nix4
3 files changed, 86 insertions, 6 deletions
diff --git a/flake.lock b/flake.lock
index 87c124d..826deb9 100644
--- a/flake.lock
+++ b/flake.lock
@@ -16,13 +16,33 @@
         "type": "gitlab"
       }
     },
+    "flake-utils": {
+      "inputs": {
+        "systems": [
+          "systems"
+        ]
+      },
+      "locked": {
+        "lastModified": 1681202837,
+        "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "cfacdce06f30d2b68473a46042957675eebb3401",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
+    },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1681779497,
-        "narHash": "sha256-f82m8Ki9upuQozus3fBaywmQ3ySLT/w6GkqHVUqQJoE=",
+        "lastModified": 1681873504,
+        "narHash": "sha256-8Ln5+boeyFyqJvxiZGhAQNFjOERuLfJP2+9trm0HPrI=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "53da61ec95e30d0d513a8be8d730dee90eff307e",
+        "rev": "a12249c541dbc06c723d62f5a45961ec8577e323",
         "type": "github"
       },
       "original": {
@@ -49,8 +69,11 @@
     },
     "root": {
       "inputs": {
+        "flake-utils": "flake-utils",
         "nixpkgs": "nixpkgs",
-        "simple-nixos-mailserver": "simple-nixos-mailserver"
+        "simple-nixos-mailserver": "simple-nixos-mailserver",
+        "systems": "systems",
+        "websites": "websites"
       }
     },
     "simple-nixos-mailserver": {
@@ -77,6 +100,21 @@
         "type": "gitlab"
       }
     },
+    "systems": {
+      "locked": {
+        "lastModified": 1680978846,
+        "narHash": "sha256-Gtqg8b/v49BFDpDetjclCYXm8mAnTrUzR0JnE2nv5aw=",
+        "owner": "nix-systems",
+        "repo": "x86_64-linux",
+        "rev": "2ecfcac5e15790ba6ce360ceccddb15ad16d08a8",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-systems",
+        "repo": "x86_64-linux",
+        "type": "github"
+      }
+    },
     "utils": {
       "locked": {
         "lastModified": 1605370193,
@@ -91,6 +129,32 @@
         "repo": "flake-utils",
         "type": "github"
       }
+    },
+    "websites": {
+      "inputs": {
+        "flake-utils": [
+          "flake-utils"
+        ],
+        "nixpkgs": [
+          "nixpkgs"
+        ],
+        "systems": [
+          "systems"
+        ]
+      },
+      "locked": {
+        "lastModified": 1681916188,
+        "narHash": "sha256-EonbPmCeRKBi2z1Xa/3gmxkcFCF87DIAW4X+cchc1XE=",
+        "ref": "refs/heads/prime",
+        "rev": "a93366f1af3aceacbbda7b25c5c65355623d08dc",
+        "revCount": 2,
+        "type": "git",
+        "url": "https://codeberg.org/vhack.eu/website.git"
+      },
+      "original": {
+        "type": "git",
+        "url": "https://codeberg.org/vhack.eu/website.git"
+      }
     }
   },
   "root": "root",
diff --git a/flake.nix b/flake.nix
index 9504c04..3baed70 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,18 +4,34 @@
 
   inputs = {
     nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11-small";
+
+    systems.url = "github:nix-systems/x86_64-linux";
+    flake-utils = {
+      url = "github:numtide/flake-utils";
+      inputs.systems.follows = "systems";
+    };
+
     simple-nixos-mailserver = {
       url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-22.11";
       inputs = {
         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";
diff --git a/system/services/nginx/default.nix b/system/services/nginx/default.nix
index 204783b..9d4d645 100644
--- a/system/services/nginx/default.nix
+++ b/system/services/nginx/default.nix
@@ -1,4 +1,4 @@
-{...}: {
+{websites, ...}: {
   networking.firewall = {
     allowedTCPPorts = [80 443];
   };
@@ -8,7 +8,7 @@
       "vhack.eu" = {
         forceSSL = true;
         enableACME = true;
-        root = "/srv/www/vhack.eu";
+        root = "${websites}/web/vhack.eu";
       };
     };
   };