parent
4765001144
commit
a81d063089
2 changed files with 11 additions and 17 deletions
|
@ -3,6 +3,8 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
systemd.services.homepage-dashboard.environment.HOMEPAGE_ALLOWED_HOSTS = "lan.nelim.org";
|
||||||
|
|
||||||
services.homepage-dashboard = {
|
services.homepage-dashboard = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
@ -8,25 +8,23 @@
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
# deps
|
# deps
|
||||||
git,
|
|
||||||
nodejs,
|
nodejs,
|
||||||
pnpm,
|
pnpm,
|
||||||
python3,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) optionalString;
|
inherit (lib) getExe optionalString;
|
||||||
|
|
||||||
installLocalIcons = import ./icons.nix {inherit fetchFromGitHub;};
|
installLocalIcons = import ./icons.nix {inherit fetchFromGitHub;};
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "homepage-dashboard";
|
pname = "homepage-dashboard";
|
||||||
version = "1.0.0";
|
version = "1.0.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "gethomepage";
|
owner = "gethomepage";
|
||||||
repo = "homepage";
|
repo = "homepage";
|
||||||
rev = "v${finalAttrs.version}";
|
rev = "v${finalAttrs.version}";
|
||||||
hash = "sha256-j543lwSWOFuPjHCTN/4vEKME39RpG4D16qWeSrL5hZY=";
|
hash = "sha256-cnVnNA0+UYYLyo7HgNvkWoSAJhr0T51MGItd/JIencE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
pnpmDepsHash = "sha256-E16+JLtfoiWCXwgFGdTGuFlx/pYxhINNl6tCuF9Z6MQ=";
|
pnpmDepsHash = "sha256-E16+JLtfoiWCXwgFGdTGuFlx/pYxhINNl6tCuF9Z6MQ=";
|
||||||
|
@ -36,24 +34,18 @@ in
|
||||||
hash = finalAttrs.pnpmDepsHash;
|
hash = finalAttrs.pnpmDepsHash;
|
||||||
};
|
};
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
pnpm build
|
|
||||||
'';
|
|
||||||
|
|
||||||
postBuild = ''
|
|
||||||
# Add a shebang to the server js file, then patch the shebang.
|
|
||||||
sed -i '1s|^|#!/usr/bin/env node\n|' .next/standalone/server.js
|
|
||||||
patchShebangs .next/standalone/server.js
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
git
|
|
||||||
makeWrapper
|
makeWrapper
|
||||||
nodejs
|
nodejs
|
||||||
pnpm.configHook
|
pnpm.configHook
|
||||||
];
|
];
|
||||||
|
|
||||||
env.PYTHON = "${python3}/bin/python";
|
buildPhase = ''
|
||||||
|
pnpm build
|
||||||
|
|
||||||
|
# Add a shebang to the server js file
|
||||||
|
sed -i '1s|^|#!${getExe nodejs}\n|' .next/standalone/server.js
|
||||||
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
Loading…
Add table
Reference in a new issue