From 74782b64a05002395f75b0ce14572749c81cda47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Sun, 21 Jul 2024 19:49:46 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(cesium/services/nginx)=20switch=20?= =?UTF-8?q?website=20to=20a=20dead=20simple=20static=20site?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.lock | 37 ++++++++++++++++--- flake.nix | 6 +++ .../cesium/services/nginx/laurent/website.nix | 20 +++++----- 3 files changed, 48 insertions(+), 15 deletions(-) diff --git a/flake.lock b/flake.lock index 257e84e..f1de2c0 100644 --- a/flake.lock +++ b/flake.lock @@ -352,11 +352,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1721428662, - "narHash": "sha256-fs5PV+LjzNizY/8fURUHOFHs/92JhzMPM7QQr4XsPtg=", + "lastModified": 1721463092, + "narHash": "sha256-P86aiF7iFAc5sAWL3nXf0XRfhXDAudHpmCh0sW7wrr4=", "ref": "refs/heads/main", - "rev": "9b0993cc49b7285a2724a87fdb72bfc90cc75cc5", - "revCount": 4933, + "rev": "f642fb97df5c69267a03452533de383ff8023570", + "revCount": 4934, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -893,7 +893,8 @@ "resume": "resume", "systems": "systems_3", "treefmt-nix": "treefmt-nix_2", - "wallpaper": "wallpaper" + "wallpaper": "wallpaper", + "website": "website" } }, "rust-overlay": { @@ -1019,6 +1020,32 @@ "url": "https://images.unsplash.com/photo-1482686115713-0fbcaced6e28" } }, + "website": { + "inputs": { + "flake-parts": [ + "flake-parts" + ], + "nixpkgs": [ + "nixpkgs" + ], + "systems": [ + "systems" + ] + }, + "locked": { + "lastModified": 1721488043, + "narHash": "sha256-zGQHwWpiT0rMzMrstKNcbvI5fP0z1qkTcU7O0TfNJDw=", + "ref": "refs/heads/master", + "rev": "920fe9300e8883fa3052528b1ec811d96f66a44d", + "revCount": 45, + "type": "git", + "url": "https://git.fainsin.bzh/Laurent/website" + }, + "original": { + "type": "git", + "url": "https://git.fainsin.bzh/Laurent/website" + } + }, "xdph": { "inputs": { "hyprland-protocols": "hyprland-protocols", diff --git a/flake.nix b/flake.nix index 99de079..40b13c7 100644 --- a/flake.nix +++ b/flake.nix @@ -69,6 +69,12 @@ }; # cesium nginx sites + website = { + url = "git+https://git.fainsin.bzh/Laurent/website"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-parts.follows = "flake-parts"; + inputs.systems.follows = "systems"; + }; resume = { url = "git+https://git.fainsin.bzh/Laurent/resume"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/cesium/services/nginx/laurent/website.nix b/hosts/cesium/services/nginx/laurent/website.nix index bb57a3c..eea8de8 100644 --- a/hosts/cesium/services/nginx/laurent/website.nix +++ b/hosts/cesium/services/nginx/laurent/website.nix @@ -1,17 +1,17 @@ -{pkgs, ...}: let - pages = pkgs.fetchgit { - url = "https://git.fainsin.bzh/Laurent/personal-website"; - branchName = "pages"; - fetchLFS = true; # https://github.com/go-gitea/gitea/issues/4773 - rev = "0c6fd235e496ead9b7ba3e4e918ec4b35dd1b56b"; # pages - sha256 = "sha256-XzI6x6ms5nmnSuS9oR+xU+dLRa2ttfOHrkGxIl7M/oc="; - }; -in { +{ + inputs, + system, + ... +}: { services.nginx.virtualHosts = { "laurent.fainsin.bzh" = { enableACME = true; forceSSL = true; - root = "${pages}"; + locations = { + "/" = { + root = inputs.website.packages.${system}.default; + }; + }; }; "fainsin.bzh" = { enableACME = true;