nixos-configs/packages/homepage/default.nix

96 lines
2.5 KiB
Nix
Raw Normal View History

{
buildNpmPackage,
fetchFromGitHub,
nodePackages,
python3,
stdenv,
cctools,
IOKit ? {},
lib,
enableLocalIcons ? true,
git,
}: let
inherit (lib) optionals optionalString;
installLocalIcons = import ./icons.nix {inherit fetchFromGitHub;};
pname = "homepage-dashboard";
chore: update sources Flake Inputs: • Updated input 'astal': 'github:Aylur/astal' (2025-01-05) rev: 3cf849f9be8b278835ee24f99956918a628c8ed1 → 'github:Aylur/astal' (2025-01-06) rev: 5c3399817fdc86150be531e42d7952e33943f0ad • Updated input 'home-manager': 'github:nix-community/home-manager' (2025-01-05) rev: 5ad12b6ea06b84e48f6b677957c74f32d47bdee0 → 'github:nix-community/home-manager' (2025-01-06) rev: 20665c6efa83d71020c8730f26706258ba5c6b2a • Updated input 'hyprland': 'github:hyprwm/Hyprland' (2025-01-05) rev: f390f48a07d117e24acec59dcf6791bcb3a81110 → 'github:hyprwm/Hyprland' (2025-01-06) rev: b9f110ef8726fcba2b4ee69856027731e73003a5 • Updated input 'hyprland/aquamarine': 'github:hyprwm/aquamarine' (2024-12-22) rev: eecb74dc79bb6752a2a507e6edee3042390a6091 → 'github:hyprwm/aquamarine' (2025-01-05) rev: 4846091641f3be0ad7542086d52769bb7932bde6 • Updated input 'hyprland/hyprgraphics': 'github:hyprwm/hyprgraphics' (2024-12-22) rev: 6dea3fba08fd704dd624b6d4b261638fb4003c9c → 'github:hyprwm/hyprgraphics' (2025-01-05) rev: 52202272d89da32a9f866c0d10305a5e3d954c50 • Updated input 'hyprland/hyprland-protocols': 'github:hyprwm/hyprland-protocols' (2025-01-01) rev: 271df559dd30e4bc5ec6af02d017ac0aaabd63a7 → 'github:hyprwm/hyprland-protocols' (2025-01-01) rev: e3b6af97ddcfaafbda8e2828c719a5af84f662cb • Updated input 'hyprland/hyprland-qtutils': 'github:hyprwm/hyprland-qtutils' (2024-12-22) rev: c77109d7e1ddbcdb87cafd32ce411f76328ae152 → 'github:hyprwm/hyprland-qtutils' (2025-01-05) rev: 6997fe382dcf396704227d2b98ffdd5066da6959 • Updated input 'hyprland/hyprlang': 'github:hyprwm/hyprlang' (2024-12-22) rev: 0404833ea18d543df44df935ebf1b497310eb046 → 'github:hyprwm/hyprlang' (2024-12-28) rev: 55608efdaa387af7bfdc0eddb404c409958efa43 • Updated input 'hyprland/hyprwayland-scanner': 'github:hyprwm/hyprwayland-scanner' (2024-12-21) rev: 4d7367b6eee87397e2dbca2e78078dd0a4ef4c61 → 'github:hyprwm/hyprwayland-scanner' (2024-12-29) rev: de913476b59ee88685fdc018e77b8f6637a2ae0b • Updated input 'hyprland/pre-commit-hooks': 'github:cachix/git-hooks.nix' (2024-12-21) rev: f0f0dc4920a903c3e08f5bdb9246bb572fcae498 → 'github:cachix/git-hooks.nix' (2025-01-03) rev: a5a961387e75ae44cc20f0a57ae463da5e959656 • Removed input 'hyprland/pre-commit-hooks/nixpkgs-stable' • Updated input 'hyprpaper': 'github:hyprwm/hyprpaper' (2024-12-29) rev: 505e447b6c48e6b49f3aecf5da276f3cc5780054 → 'github:hyprwm/hyprpaper' (2025-01-06) rev: 251e8e2593cdd2ef0a015f4f6e211a7bab3a63ed • Updated input 'hyprutils': 'github:hyprwm/hyprutils' (2025-01-03) rev: fb9a816cb91c6b6c4fcdc348d56fd54ba524546d → 'github:hyprwm/hyprutils' (2025-01-06) rev: 3c895da64b0eb19870142196fa48c07090b441c4 • Updated input 'nix-eval-jobs': 'github:nix-community/nix-eval-jobs' (2024-12-11) rev: b1f94fed4af8e7f30665a3bf8b369dc3b8a95884 → 'github:nix-community/nix-eval-jobs' (2025-01-06) rev: cbae9154bc76c5aa7873f0a67b3c9f13124929d3 • Updated input 'nix-fast-build': 'github:Mic92/nix-fast-build' (2024-12-20) rev: ed736c65a8cb58a85369f6ee1c3f4403aa904fcc → 'github:Mic92/nix-fast-build' (2025-01-06) rev: a06a8b2c079f7b6dab491a12555387bdb737cc44 • Updated input 'nix-gaming': 'github:fufexan/nix-gaming' (2025-01-05) rev: 118be90db8e4b06e3829b7b6ea901b610e870040 → 'github:fufexan/nix-gaming' (2025-01-06) rev: c94feb626623183da1121d9849f1af2de3dca66f • Updated input 'nixpkgs': 'github:NixOS/nixpkgs' (2025-01-02) rev: 6df24922a1400241dae323af55f30e4318a6ca65 → 'github:NixOS/nixpkgs' (2025-01-04) rev: 8f3e1f807051e32d8c95cd12b9b421623850a34d • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland' (2025-01-05) rev: 7595aa1a3153be4c7aea30c0982f53230088012c → 'github:nix-community/nixpkgs-wayland' (2025-01-06) rev: 45a323916997d118ea2d4acbb298c585c9cb877a • Updated input 'sops-nix': 'github:Mic92/sops-nix' (2025-01-05) rev: 5dc08f9cc77f03b43aacffdfbc8316807773c930 → 'github:Mic92/sops-nix' (2025-01-06) rev: c9c88f08e3ee495e888b8d7c8624a0b2519cb773 • Updated input 'spotifyplus-src': 'github:thlucas1/homeassistantcomponent_spotifyplus' (2025-01-05) rev: b1412937a08695f64dd7735e2c36806ce8b551fd → 'github:thlucas1/homeassistantcomponent_spotifyplus' (2025-01-06) rev: 0d10ee4f21585b6a154025f32723728bfe1c9967 • Updated input 'spotifywebapi-src': 'github:thlucas1/SpotifyWebApiPython' (2025-01-05) rev: 64cb8b0c15895c714f4b7ef1af92d899725e58cf → 'github:thlucas1/SpotifyWebApiPython' (2025-01-06) rev: ee14d22f83e817948795bb88b492e0f0986e0464 • Updated input 'ts-for-gir-src': 'github:gjsify/ts-for-gir' (2025-01-02) rev: 8bb1e5670198b52be53d5585915a1a3f8cc324ed → 'github:gjsify/ts-for-gir' (2025-01-06) rev: 5ea66da5513587dc76a68180b9ea772657e4ed5e • Updated input 'tuya-local-src': 'github:make-all/tuya-local' (2025-01-05) rev: 469562350c49b86d0242e1c8cd2ed6a29663b1fe → 'github:make-all/tuya-local' (2025-01-06) rev: 349197eeb1e736b89659c2d48b3ddc17dd258f32 Docker Images: • rssbridge/rss-bridge latest: sha256:d4cb094a7bdc2d825db7ae5ebfcd2415e3ca5ff78a4fb56a045f1074fa3ae5b4 → sha256:dc9aecdbbc73f2e78628a04d4e6973f8947b38f648a7d97927b80c6da340f22f • ghcr.io/linuxserver/sonarr latest: sha256:6221d75e172247220c320bb340ce0ff96a09339216de52b8d861424bfc501cef → sha256:23f6911b2b81cb69aa03166b53c15081d5c3a5ed58f5b183c5900c2d8fc9759a Firefox Addons: floccus: 5.4.0 -> 5.4.2.1 Node modules: typescript-eslint: 8.19.0 -> 8.19.1 nix-update executions: homepage: 0.10.8 -> 0.10.9
2025-01-06 23:20:49 -05:00
version = "0.10.9";
in
buildNpmPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "gethomepage";
repo = "homepage";
rev = "v${version}";
chore: update sources Flake Inputs: • Updated input 'astal': 'github:Aylur/astal' (2025-01-05) rev: 3cf849f9be8b278835ee24f99956918a628c8ed1 → 'github:Aylur/astal' (2025-01-06) rev: 5c3399817fdc86150be531e42d7952e33943f0ad • Updated input 'home-manager': 'github:nix-community/home-manager' (2025-01-05) rev: 5ad12b6ea06b84e48f6b677957c74f32d47bdee0 → 'github:nix-community/home-manager' (2025-01-06) rev: 20665c6efa83d71020c8730f26706258ba5c6b2a • Updated input 'hyprland': 'github:hyprwm/Hyprland' (2025-01-05) rev: f390f48a07d117e24acec59dcf6791bcb3a81110 → 'github:hyprwm/Hyprland' (2025-01-06) rev: b9f110ef8726fcba2b4ee69856027731e73003a5 • Updated input 'hyprland/aquamarine': 'github:hyprwm/aquamarine' (2024-12-22) rev: eecb74dc79bb6752a2a507e6edee3042390a6091 → 'github:hyprwm/aquamarine' (2025-01-05) rev: 4846091641f3be0ad7542086d52769bb7932bde6 • Updated input 'hyprland/hyprgraphics': 'github:hyprwm/hyprgraphics' (2024-12-22) rev: 6dea3fba08fd704dd624b6d4b261638fb4003c9c → 'github:hyprwm/hyprgraphics' (2025-01-05) rev: 52202272d89da32a9f866c0d10305a5e3d954c50 • Updated input 'hyprland/hyprland-protocols': 'github:hyprwm/hyprland-protocols' (2025-01-01) rev: 271df559dd30e4bc5ec6af02d017ac0aaabd63a7 → 'github:hyprwm/hyprland-protocols' (2025-01-01) rev: e3b6af97ddcfaafbda8e2828c719a5af84f662cb • Updated input 'hyprland/hyprland-qtutils': 'github:hyprwm/hyprland-qtutils' (2024-12-22) rev: c77109d7e1ddbcdb87cafd32ce411f76328ae152 → 'github:hyprwm/hyprland-qtutils' (2025-01-05) rev: 6997fe382dcf396704227d2b98ffdd5066da6959 • Updated input 'hyprland/hyprlang': 'github:hyprwm/hyprlang' (2024-12-22) rev: 0404833ea18d543df44df935ebf1b497310eb046 → 'github:hyprwm/hyprlang' (2024-12-28) rev: 55608efdaa387af7bfdc0eddb404c409958efa43 • Updated input 'hyprland/hyprwayland-scanner': 'github:hyprwm/hyprwayland-scanner' (2024-12-21) rev: 4d7367b6eee87397e2dbca2e78078dd0a4ef4c61 → 'github:hyprwm/hyprwayland-scanner' (2024-12-29) rev: de913476b59ee88685fdc018e77b8f6637a2ae0b • Updated input 'hyprland/pre-commit-hooks': 'github:cachix/git-hooks.nix' (2024-12-21) rev: f0f0dc4920a903c3e08f5bdb9246bb572fcae498 → 'github:cachix/git-hooks.nix' (2025-01-03) rev: a5a961387e75ae44cc20f0a57ae463da5e959656 • Removed input 'hyprland/pre-commit-hooks/nixpkgs-stable' • Updated input 'hyprpaper': 'github:hyprwm/hyprpaper' (2024-12-29) rev: 505e447b6c48e6b49f3aecf5da276f3cc5780054 → 'github:hyprwm/hyprpaper' (2025-01-06) rev: 251e8e2593cdd2ef0a015f4f6e211a7bab3a63ed • Updated input 'hyprutils': 'github:hyprwm/hyprutils' (2025-01-03) rev: fb9a816cb91c6b6c4fcdc348d56fd54ba524546d → 'github:hyprwm/hyprutils' (2025-01-06) rev: 3c895da64b0eb19870142196fa48c07090b441c4 • Updated input 'nix-eval-jobs': 'github:nix-community/nix-eval-jobs' (2024-12-11) rev: b1f94fed4af8e7f30665a3bf8b369dc3b8a95884 → 'github:nix-community/nix-eval-jobs' (2025-01-06) rev: cbae9154bc76c5aa7873f0a67b3c9f13124929d3 • Updated input 'nix-fast-build': 'github:Mic92/nix-fast-build' (2024-12-20) rev: ed736c65a8cb58a85369f6ee1c3f4403aa904fcc → 'github:Mic92/nix-fast-build' (2025-01-06) rev: a06a8b2c079f7b6dab491a12555387bdb737cc44 • Updated input 'nix-gaming': 'github:fufexan/nix-gaming' (2025-01-05) rev: 118be90db8e4b06e3829b7b6ea901b610e870040 → 'github:fufexan/nix-gaming' (2025-01-06) rev: c94feb626623183da1121d9849f1af2de3dca66f • Updated input 'nixpkgs': 'github:NixOS/nixpkgs' (2025-01-02) rev: 6df24922a1400241dae323af55f30e4318a6ca65 → 'github:NixOS/nixpkgs' (2025-01-04) rev: 8f3e1f807051e32d8c95cd12b9b421623850a34d • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland' (2025-01-05) rev: 7595aa1a3153be4c7aea30c0982f53230088012c → 'github:nix-community/nixpkgs-wayland' (2025-01-06) rev: 45a323916997d118ea2d4acbb298c585c9cb877a • Updated input 'sops-nix': 'github:Mic92/sops-nix' (2025-01-05) rev: 5dc08f9cc77f03b43aacffdfbc8316807773c930 → 'github:Mic92/sops-nix' (2025-01-06) rev: c9c88f08e3ee495e888b8d7c8624a0b2519cb773 • Updated input 'spotifyplus-src': 'github:thlucas1/homeassistantcomponent_spotifyplus' (2025-01-05) rev: b1412937a08695f64dd7735e2c36806ce8b551fd → 'github:thlucas1/homeassistantcomponent_spotifyplus' (2025-01-06) rev: 0d10ee4f21585b6a154025f32723728bfe1c9967 • Updated input 'spotifywebapi-src': 'github:thlucas1/SpotifyWebApiPython' (2025-01-05) rev: 64cb8b0c15895c714f4b7ef1af92d899725e58cf → 'github:thlucas1/SpotifyWebApiPython' (2025-01-06) rev: ee14d22f83e817948795bb88b492e0f0986e0464 • Updated input 'ts-for-gir-src': 'github:gjsify/ts-for-gir' (2025-01-02) rev: 8bb1e5670198b52be53d5585915a1a3f8cc324ed → 'github:gjsify/ts-for-gir' (2025-01-06) rev: 5ea66da5513587dc76a68180b9ea772657e4ed5e • Updated input 'tuya-local-src': 'github:make-all/tuya-local' (2025-01-05) rev: 469562350c49b86d0242e1c8cd2ed6a29663b1fe → 'github:make-all/tuya-local' (2025-01-06) rev: 349197eeb1e736b89659c2d48b3ddc17dd258f32 Docker Images: • rssbridge/rss-bridge latest: sha256:d4cb094a7bdc2d825db7ae5ebfcd2415e3ca5ff78a4fb56a045f1074fa3ae5b4 → sha256:dc9aecdbbc73f2e78628a04d4e6973f8947b38f648a7d97927b80c6da340f22f • ghcr.io/linuxserver/sonarr latest: sha256:6221d75e172247220c320bb340ce0ff96a09339216de52b8d861424bfc501cef → sha256:23f6911b2b81cb69aa03166b53c15081d5c3a5ed58f5b183c5900c2d8fc9759a Firefox Addons: floccus: 5.4.0 -> 5.4.2.1 Node modules: typescript-eslint: 8.19.0 -> 8.19.1 nix-update executions: homepage: 0.10.8 -> 0.10.9
2025-01-06 23:20:49 -05:00
hash = "sha256-q8+uoikHMQVuTrVSH8tPsoI5655ZStMc/7tmoAfoZIY=";
};
chore: update sources Flake Inputs: • Updated input 'ags': 'github:Aylur/ags' (2024-12-29) rev: 251d39413543264361898b02035775aa3e46fe52 → 'github:Aylur/ags' (2025-01-05) rev: 5527c3c07d92c11e04e7fd99d58429493dba7e3c • Updated input 'astal': 'github:Aylur/astal' (2025-01-03) rev: a3bb83a22b7d237c2c2fc6bd531f30d6265135cf → 'github:Aylur/astal' (2025-01-05) rev: 3cf849f9be8b278835ee24f99956918a628c8ed1 • Updated input 'custom-sidebar-src': 'github:elchininet/custom-sidebar' (2024-12-29) rev: 1eb46357a9eb68a4981364ca8cea3bd588bf0dd3 → 'github:elchininet/custom-sidebar' (2025-01-05) rev: f5a9a86adcbe68aeefea45e12294368d54fe8156 • Updated input 'home-manager': 'github:nix-community/home-manager' (2025-01-03) rev: a9987622b7b93c82e147f198574e8e6ffbf5e327 → 'github:nix-community/home-manager' (2025-01-05) rev: 5ad12b6ea06b84e48f6b677957c74f32d47bdee0 • Updated input 'hyprland': 'github:hyprwm/Hyprland' (2025-01-03) rev: 60f069d54015fec66e63f1ff7e6ff26ddb349976 → 'github:hyprwm/Hyprland' (2025-01-05) rev: f390f48a07d117e24acec59dcf6791bcb3a81110 • Updated input 'hyprland-plugins': 'github:hyprwm/hyprland-plugins' (2025-01-02) rev: 920af33577a889772e96a067130252df5674ca8a → 'github:hyprwm/hyprland-plugins' (2025-01-05) rev: b6b31113ce84419c69ed575c22194e4023d2952a • Updated input 'nix-gaming': 'github:fufexan/nix-gaming' (2025-01-03) rev: afc74611082ecc4a961e4317fa2763c8812e217f → 'github:fufexan/nix-gaming' (2025-01-05) rev: 118be90db8e4b06e3829b7b6ea901b610e870040 • Updated input 'nix-index-db': 'github:Mic92/nix-index-database' (2024-12-29) rev: 55ab1e1df5daf2476e6b826b69a82862dcbd7544 → 'github:Mic92/nix-index-database' (2025-01-05) rev: 816a6ae88774ba7e74314830546c29e134e0dffb • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland' (2025-01-03) rev: 42ccba23ce4661f9a1df9c4455533888ca123683 → 'github:nix-community/nixpkgs-wayland' (2025-01-05) rev: 7595aa1a3153be4c7aea30c0982f53230088012c • Updated input 'sops-nix': 'github:Mic92/sops-nix' (2025-01-02) rev: 24d89184adf76d7ccc99e659dc5f3838efb5ee32 → 'github:Mic92/sops-nix' (2025-01-05) rev: 5dc08f9cc77f03b43aacffdfbc8316807773c930 • Updated input 'spotifyplus-src': 'github:thlucas1/homeassistantcomponent_spotifyplus' (2025-01-03) rev: a55a6fbd3b9ea4664e90ae5c74a7936345008cf7 → 'github:thlucas1/homeassistantcomponent_spotifyplus' (2025-01-05) rev: b1412937a08695f64dd7735e2c36806ce8b551fd • Updated input 'spotifywebapi-src': 'github:thlucas1/SpotifyWebApiPython' (2025-01-03) rev: be9d8420897f06789a00077f227f5a87a22c2fd4 → 'github:thlucas1/SpotifyWebApiPython' (2025-01-05) rev: 64cb8b0c15895c714f4b7ef1af92d899725e58cf • Updated input 'tuya-local-src': 'github:make-all/tuya-local' (2025-01-04) rev: 28f344ece2e4f1b8824000fea1a40276bb097cf5 → 'github:make-all/tuya-local' (2025-01-05) rev: 469562350c49b86d0242e1c8cd2ed6a29663b1fe Docker Images: • vegardit/gitea-act-runner dind-latest: sha256:a587df58615ddadf61caabdd904c6493ef0419efbda3e523edac96bb52689773 → sha256:b918e08b14472ed8d0727e6a14948f252b99f4b5d2c0a68e283f816db4f28aa0 • rssbridge/rss-bridge latest: sha256:c72b284fe82f6c2bf676d55a3e5354e53108095a8d698ac1c9211b5b854c79d4 → sha256:d4cb094a7bdc2d825db7ae5ebfcd2415e3ca5ff78a4fb56a045f1074fa3ae5b4 • ghcr.io/linuxserver/prowlarr latest: sha256:d089b21e8ab2584b7e1713bde5d5f0160d7c9e850ceb2db53158a85ad3caac57 → sha256:1f235ff7a178444398a9a431a4e65704d22f83a348192dececf75811212c9217 • ghcr.io/linuxserver/radarr latest: sha256:eb894bd26fd3fb29981bf91b140834417ce2ed28ab8217d0ce121db5c460f39a → sha256:e633fc93b9e2cea959853d27c6acc1d0b2d1ed7db4a800f6f46fe5b217f13102 Misc Sources: Vuetorrent: 2.20.1 -> 2.21.0 nix-update executions: homepage: 0.10.7 -> 0.10.8
2025-01-05 17:51:30 -05:00
npmDepsHash = "sha256-N39gwct2U4UxlIL5ceDzzU7HpA6xh2WksrZNxGz04PU=";
preBuild = ''
mkdir -p config
'';
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 = [git] ++ optionals stdenv.hostPlatform.isDarwin [cctools];
buildInputs =
[
nodePackages.node-gyp-build
]
++ optionals stdenv.hostPlatform.isDarwin [IOKit];
env.PYTHON = "${python3}/bin/python";
installPhase = ''
runHook preInstall
mkdir -p $out/{share,bin}
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
# This patch must be applied here, as it's patching the `dist` directory
# of NextJS. Without this, homepage-dashboard errors when trying to
# write its prerender cache.
#
# This patch ensures that the cache implementation respects the env
# variable `HOMEPAGE_CACHE_DIR`, which is set by default in the
# wrapper below.
pushd $out
git apply ${./prerender_cache_path.patch}
popd
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
'';
doDist = false;
meta = {
description = "Highly customisable dashboard with Docker and service API integrations";
changelog = "https://github.com/gethomepage/homepage/releases/tag/v${version}";
mainProgram = "homepage";
homepage = "https://gethomepage.dev";
license = lib.licenses.gpl3;
};
}