This commit is contained in:
Hadi 2024-06-23 14:45:51 +02:00
parent 1efdadbdad
commit bbb35737c2
3 changed files with 40 additions and 13 deletions

View File

@ -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";
};
}

View File

@ -1,12 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
Anotherhadi website
</body>
</html>

View File

@ -1,5 +1,9 @@
{
imports = [ ./home.anotherhadi.com.nix ./start.anotherhadi.com.nix ];
imports = [
./home.anotherhadi.com.nix
./start.anotherhadi.com.nix
./anotherhadi.com.nix
];
services.nginx.virtualHosts = {
"anotherhadi.com" = {