From bbb35737c299cb4f2d288c265f493d03d3500504 Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Sun, 23 Jun 2024 14:45:51 +0200 Subject: [PATCH] Update --- hosts/server/modules/www/anotherhadi.com.nix | 35 +++++++++++++++++++ .../modules/www/anotherhadi.com/index.html | 12 ------- hosts/server/modules/www/default.nix | 6 +++- 3 files changed, 40 insertions(+), 13 deletions(-) create mode 100644 hosts/server/modules/www/anotherhadi.com.nix delete mode 100644 hosts/server/modules/www/anotherhadi.com/index.html diff --git a/hosts/server/modules/www/anotherhadi.com.nix b/hosts/server/modules/www/anotherhadi.com.nix new file mode 100644 index 0000000..45332e6 --- /dev/null +++ b/hosts/server/modules/www/anotherhadi.com.nix @@ -0,0 +1,35 @@ +{ pkgs, lib, ... }: +let + package = pkgs.buildNpmPackage { + pname = "homepage"; + version = "0.0.0"; + + src = pkgs.fetchFromGitHub { + owner = "anotherhadi"; + repo = "portfolio"; + rev = "3f03233f7dcc5fb175c8bba8874a2f5c26999c93"; + hash = "sha256-q8cRi3DEwM/9DUxKbeJMv/TULf/mR0pg16orkd3xMNo="; + }; + + npmDepsHash = lib.fakeHash; + + buildPhase = '' + npm install + npm run build + mkdir $out + mv build $out + ''; + + meta = { + description = "portfolio"; + homepage = "https://github.com/anotherhadi/portfolio"; + }; + }; + +in { + services.nginx.virtualHosts."anotherhadi.com" = { + serverAliases = [ "www.anotherhadi.com" ]; + enableACME = true; + root = package + "/build"; + }; +} diff --git a/hosts/server/modules/www/anotherhadi.com/index.html b/hosts/server/modules/www/anotherhadi.com/index.html deleted file mode 100644 index 367ab48..0000000 --- a/hosts/server/modules/www/anotherhadi.com/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - -
-