mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-04 12:02:09 +02:00
Update
This commit is contained in:
@@ -1,25 +1,28 @@
|
||||
{ lib, buildNpmPackage, fetchFromGitHub }:
|
||||
{ pkgs, ... }: {
|
||||
nginx.virtualHosts."home.anotherhadi.com" = {
|
||||
enableACME = true;
|
||||
root = pkgs.stdenv.mkDerivation {
|
||||
name = "homepage";
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "homepage";
|
||||
version = "0.0.0";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "anotherhadi";
|
||||
repo = "homepage";
|
||||
rev = "6588787368cbc403cdec08fd25ef27b42077b8d3";
|
||||
hash = "sha256-Z2TZ56I6lRmYkLRnnMscvmSCzGt5q9yX90lGPebJpe8=";
|
||||
};
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "anotherhadi";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-BR+ZGkBBfd0dSQqAvujsbgsEPFYw/ThrylxUbOksYxM=";
|
||||
};
|
||||
buildInputs = with pkgs; [ nodejs ];
|
||||
|
||||
npmDepsHash = "sha256-tuEfyePwlOy2/mOPdXbqJskO6IowvAP4DWg8xSZwbJw=";
|
||||
buildPhase = ''
|
||||
npm install
|
||||
npm run build
|
||||
'';
|
||||
|
||||
# The prepack script runs the build script, which we'd rather do in the build phase.
|
||||
npmPackFlags = [ "--ignore-scripts" ];
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r build/* $out
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A simple homepage for your server.";
|
||||
homepage = "https://github.com/anotherhadi/homepage";
|
||||
# license = lib.licenses.gpl3Only;
|
||||
# maintainers = with lib.maintainers; [ winter ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user