2026-02-19 11:22:44 -08:00
|
|
|
# Nix-built ntfy push notification server
|
2026-03-23 10:32:06 -07:00
|
|
|
# Builds v2.19.2 from forge mirror
|
2026-02-19 11:22:44 -08:00
|
|
|
# Built with dockerTools.buildLayeredImage for efficient layer caching
|
|
|
|
|
{ pkgs ? import <nixpkgs> { } }:
|
|
|
|
|
|
2026-02-20 22:50:01 -08:00
|
|
|
let
|
2026-03-23 10:32:06 -07:00
|
|
|
version = "2.19.2";
|
2026-02-20 22:50:01 -08:00
|
|
|
|
|
|
|
|
src = pkgs.fetchgit {
|
Migrate upstream mirrors to mirrors/ Forgejo org (#265)
## Summary
- Created `mirrors` Forgejo organization for upstream mirror repos
- Transferred 22 mirror repos from `eblume/` to `mirrors/` (mirror sync config preserved)
- Deleted unused repos: hajimari, hister
- Updated all container build URLs (homepage, navidrome, ntfy Dockerfiles + nix)
- Updated documentation references (migrate-forgejo-from-brew, upstream-fork-strategy, fix-ntfy-nix-version)
- `dotfiles` intentionally kept under `eblume/` per user request
- `devpi` transferred to `mirrors/`
Repos remaining under `eblume/`: blumeops, cv, mcquack, dotfiles
## Cleanup TODO
- [ ] Delete temp Forgejo API token "claude-migration-temp" (Settings > Applications)
## Test Plan
- [x] Verified mirror config (mirror=true, original_url) survived transfer on test repo (tesla_auth)
- [x] All pre-commit hooks pass (including container-version-check, docs-check-links)
- [ ] Verify a mirror repo sync runs successfully after transfer (check mirrors/authentik or similar)
- [ ] Rebuild containers from branch to verify Dockerfile URLs resolve
Reviewed-on: https://forge.ops.eblu.me/eblume/blumeops/pulls/265
2026-02-24 20:43:14 -08:00
|
|
|
url = "https://forge.ops.eblu.me/mirrors/ntfy.git";
|
2026-02-20 22:50:01 -08:00
|
|
|
rev = "v${version}";
|
2026-03-23 10:32:06 -07:00
|
|
|
hash = "sha256-HISQnb6LkKGujZsWCzVD3dTuobhUXqrmTFuov7dU+lY=";
|
2026-02-20 22:50:01 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ui = pkgs.buildNpmPackage {
|
|
|
|
|
inherit src version;
|
|
|
|
|
pname = "ntfy-sh-ui";
|
2026-03-23 10:32:06 -07:00
|
|
|
npmDepsHash = "sha256-PmhWzktybM6Cg7yYRfbxWE83C+XkmHh4garHhsydwwE=";
|
2026-02-20 22:50:01 -08:00
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
|
cd web/
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
runHook preInstall
|
|
|
|
|
mv build/index.html build/app.html
|
|
|
|
|
rm build/config.js
|
|
|
|
|
mkdir -p $out
|
|
|
|
|
mv build/ $out/site
|
|
|
|
|
runHook postInstall
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ntfy = pkgs.buildGoModule {
|
|
|
|
|
inherit src version;
|
|
|
|
|
pname = "ntfy-sh";
|
2026-03-23 10:32:06 -07:00
|
|
|
vendorHash = "sha256-mr2PbxT5QWf4HZGgUg+oUjauqmZ6bh6N3f0ytwPDppU=";
|
2026-02-20 22:50:01 -08:00
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
2026-03-23 10:32:06 -07:00
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
2026-02-20 22:50:01 -08:00
|
|
|
ldflags = [
|
|
|
|
|
"-s"
|
|
|
|
|
"-w"
|
|
|
|
|
"-X main.version=${version}"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
|
sed -i 's# /bin/echo# echo#' Makefile
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
# Copy pre-built web UI; skip docs (create placeholder for go:embed)
|
|
|
|
|
preBuild = ''
|
|
|
|
|
cp -r ${ui}/site/ server/
|
|
|
|
|
mkdir -p server/docs && touch server/docs/placeholder
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = with pkgs.lib; {
|
|
|
|
|
description = "Send push notifications to your phone or desktop via PUT/POST";
|
|
|
|
|
homepage = "https://ntfy.sh";
|
|
|
|
|
license = licenses.asl20;
|
|
|
|
|
mainProgram = "ntfy";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
in
|
|
|
|
|
|
2026-02-19 11:22:44 -08:00
|
|
|
pkgs.dockerTools.buildLayeredImage {
|
|
|
|
|
name = "blumeops/ntfy";
|
|
|
|
|
contents = [
|
2026-02-20 22:50:01 -08:00
|
|
|
ntfy
|
2026-02-19 11:22:44 -08:00
|
|
|
pkgs.cacert
|
|
|
|
|
pkgs.tzdata
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
config = {
|
2026-02-20 22:50:01 -08:00
|
|
|
Entrypoint = [ "${ntfy}/bin/ntfy" ];
|
2026-02-19 11:22:44 -08:00
|
|
|
Env = [
|
|
|
|
|
"SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
|
|
|
|
|
"TZDIR=${pkgs.tzdata}/share/zoneinfo"
|
|
|
|
|
];
|
|
|
|
|
ExposedPorts = {
|
|
|
|
|
"80/tcp" = { };
|
|
|
|
|
};
|
|
|
|
|
User = "65534";
|
|
|
|
|
};
|
|
|
|
|
}
|