Flake Inputs: • Updated input 'custom-sidebar-src': 'github:elchininet/custom-sidebar' (2025-03-12) rev: 82f40bbaa1bf833290de84efbdc576362cc75905 → 'github:elchininet/custom-sidebar' (2025-03-15) rev: c7750d7b10b01d17d9850db58a8c8ac8211eb9d5 • Updated input 'gpu-screen-recorder-src': 'git+https://repo.dec05eba.com/gpu-screen-recorder' (2025-03-13) rev: bab9a0560d15e7e1621469cf8db3e70bc29833b6 → 'git+https://repo.dec05eba.com/gpu-screen-recorder' (2025-03-14) rev: 190c775a08ca092ac0145ce3483a421bfdc940c6 • Updated input 'home-manager': 'github:nix-community/home-manager' (2025-03-14) rev: 30cce6848a5aa41ceb5fb33185b84868cc3e9bef → 'github:nix-community/home-manager' (2025-03-14) rev: 4e12151c9e014e2449e0beca2c0e9534b96a26b4 • Updated input 'hyprgrass': 'github:horriblename/hyprgrass' (2025-03-13) rev: ce0dcda79e0b24c9dfee2d80df50940669554f9d → 'github:horriblename/hyprgrass' (2025-03-14) rev: 94ebb595b646c9788b9d39928648deab24ece9d0 • Updated input 'hyprland': 'github:hyprwm/Hyprland' (2025-03-12) rev: e86d3a14e46d19d8a47f8ceb6410546715d45f10 → 'github:hyprwm/Hyprland' (2025-03-15) rev: e59680481d74fdfcc432bb9640ba2c979022c4c2 • Updated input 'hyprland/aquamarine': 'github:hyprwm/aquamarine' (2025-03-06) rev: 81498562d0f53e613d30368bb5b076784fa86f80 → 'github:hyprwm/aquamarine' (2025-03-14) rev: bea48d0bbe15fb3d758a8b6be865836c97056575 • Updated input 'hyprland/hyprutils': 'github:hyprwm/hyprutils' (2025-03-04) rev: 6b0154b183f9539097f13af9b5da78ca24da6df2 → 'github:hyprwm/hyprutils' (2025-03-09) rev: dd1f720cbc2dbb3c71167c9598045dd3261d27b3 • Updated input 'hyprland/xdph': 'github:hyprwm/xdg-desktop-portal-hyprland' (2025-01-23) rev: e09dfe2726c8008f983e45a0aa1a3b7416aaeb8a → 'github:hyprwm/xdg-desktop-portal-hyprland' (2025-03-14) rev: 150b0b6f52bb422a1b232a53698606fe0320dde0 • Updated input 'jovian': 'github:Jovian-Experiments/Jovian-NixOS' (2025-03-13) rev: 662d117ac0ffc81f3e91b5f0fb800c3effd904a1 → 'github:Jovian-Experiments/Jovian-NixOS' (2025-03-14) rev: 534188d0b0cbddf3f9df3f20cfbc424efb46b36c • Updated input 'material-symbols-src': 'github:beecho01/material-symbols' (2025-03-05) rev: 35cb201a18931f2096a883cf86bc08cc11ec456c → 'github:beecho01/material-symbols' (2025-03-14) rev: 376709da5aa69163ffb02deb13e9e7fac93ae53f • Updated input 'nix-gaming': 'github:fufexan/nix-gaming' (2025-03-11) rev: 64a949349294543a48b3f946c9fca84332d1398b → 'github:fufexan/nix-gaming' (2025-03-14) rev: b2a32ef80ad0cc7f3dee928771791625ff9494c1 • Updated input 'nixpkgs': 'github:NixOS/nixpkgs' (2025-03-13) rev: 01f44b8389188522fba255168c70eda093867746 → 'github:NixOS/nixpkgs' (2025-03-13) rev: 6607cf789e541e7873d40d3a8f7815ea92204f32 • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland' (2025-03-13) rev: 35d3b8403711ab0b38c4554703c283900cfeeb7a → 'github:nix-community/nixpkgs-wayland' (2025-03-15) rev: ff6a5e6d2e8ae7ffff051ea35966ae2d225f397e • Updated input 'spotifyplus-src': 'github:thlucas1/homeassistantcomponent_spotifyplus' (2025-03-13) rev: cf1acfa270b14bdaae8ca4f36cf7099f65824554 → 'github:thlucas1/homeassistantcomponent_spotifyplus' (2025-03-14) rev: 05a60bbefa09ac173ce8dab0dd5d71d23b379ac9 • Updated input 'spotifywebapi-src': 'github:thlucas1/SpotifyWebApiPython' (2025-03-13) rev: e6c5bfe0c5621bf0e24d61060a7c181a6226c6c4 → 'github:thlucas1/SpotifyWebApiPython' (2025-03-14) rev: 23e89dc0a68d10447e756ee6c0e5e9fa0fdbdc18 Docker Images: • vegardit/gitea-act-runner dind-latest: sha256:a1c106a18b1fa02736064a18f9d31d18253347b7625673a58d5cfd98cc64bc2f → sha256:6190e52b6df100a1ca6be7e2e8331c60422440f98dfd286cc49c6be54d6783b5 • nextcloud fpm: sha256:dd76149894cc80b2d55b06d9d3f79a8aacc9d5246161bdcf4e0271406af10c8e → sha256:6854c0336040c628b84bd286fa898675d00d77139b0299c6e39793da454e2115 • ghcr.io/linuxserver/sonarr latest: sha256:49a8e636fd4514b23d37c84660101fecbb632174ba0569e0f09bbd2659a2a925 → sha256:b666479159c0ffc17d5c2281737c9a88d78afcaa0aa52cb441b46336f6feba31 nix-update executions: homepage: 1.0.1 -> 1.0.2
99 lines
2.7 KiB
Nix
99 lines
2.7 KiB
Nix
{
|
|
# params
|
|
enableLocalIcons ? true,
|
|
# nix build inputs
|
|
lib,
|
|
stdenv,
|
|
concatTextFile,
|
|
fetchFromGitHub,
|
|
makeWrapper,
|
|
# deps
|
|
nodejs,
|
|
pnpm,
|
|
...
|
|
}: let
|
|
inherit (lib) getExe optionalString;
|
|
|
|
installLocalIcons = import ./icons.nix {inherit fetchFromGitHub;};
|
|
in
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "homepage-dashboard";
|
|
version = "1.0.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "gethomepage";
|
|
repo = "homepage";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-9x0BuSl9WNiqkDH5Dtt1KqxYxQDYaDSBH8ywH/8O6VU=";
|
|
};
|
|
|
|
pnpmDepsHash = "sha256-E16+JLtfoiWCXwgFGdTGuFlx/pYxhINNl6tCuF9Z6MQ=";
|
|
|
|
pnpmDeps = pnpm.fetchDeps {
|
|
inherit (finalAttrs) pname version src;
|
|
hash = finalAttrs.pnpmDepsHash;
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
nodejs
|
|
pnpm.configHook
|
|
];
|
|
|
|
buildPhase = ''
|
|
pnpm build
|
|
|
|
# Add a shebang to the server js file
|
|
sed -i '1s|^|#!${getExe nodejs}\n|' .next/standalone/server.js
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/{share,bin}
|
|
|
|
# Without this, homepage-dashboard errors when trying to
|
|
# write its prerender cache.
|
|
#
|
|
# This ensures that the cache implementation respects the env
|
|
# variable `HOMEPAGE_CACHE_DIR`, which is set by default in the
|
|
# wrapper below.
|
|
substituteInPlace .next/standalone/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js --replace-fail \
|
|
"this.serverDistDir = ctx.serverDistDir;" \
|
|
"this.serverDistDir = require('node:path').join(process.env.HOMEPAGE_CACHE_DIR, \"homepage\");"
|
|
|
|
cp -r .next/standalone $out/share/homepage/
|
|
cp -r public $out/share/homepage/public
|
|
|
|
mkdir -p $out/share/homepage/.next
|
|
cp -r .next/static $out/share/homepage/.next/static
|
|
|
|
chmod +x $out/share/homepage/server.js
|
|
|
|
makeWrapper $out/share/homepage/server.js $out/bin/homepage \
|
|
--set-default PORT 3000 \
|
|
--set-default HOMEPAGE_CONFIG_DIR /var/lib/homepage-dashboard \
|
|
--set-default HOMEPAGE_CACHE_DIR /var/cache/homepage-dashboard
|
|
|
|
${optionalString enableLocalIcons installLocalIcons}
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.updateScript = concatTextFile {
|
|
name = "update";
|
|
files = [./update.sh];
|
|
executable = true;
|
|
destination = "/bin/update";
|
|
};
|
|
|
|
meta = {
|
|
mainProgram = "homepage";
|
|
license = lib.licenses.gpl3;
|
|
homepage = "https://gethomepage.dev";
|
|
changelog = "https://github.com/gethomepage/homepage/releases/tag/v${finalAttrs.version}";
|
|
description = ''
|
|
Highly customisable dashboard with Docker and service API integrations.
|
|
'';
|
|
};
|
|
})
|