Nix flake and NixOS module (#461)
- github
- github/openchronology/timeline-app
- commit
- main
- github/athanclark
flake.nix builds OpenChronology from source for x86_64 and aarch64 Linux: the server and website (buildNpmPackage, dependencies pinned by package-lock.json through importNpmLock), och-convert and the desktop app (pinned by their Cargo.lock files), and pgmp, at the commit the Dockerfiles pin. The server is laid out as the Debian package installs it, with its commands, the source archive the footer links to, and npm's prebuilt native modules patched for NixOS. nixosModules.default is services.openchronology: - PostgreSQL with pgmp, and the database and its role; - a generated AUTH_ENCRYPTION_KEY; - the server, migrating as it starts, with the Debian unit's hardening; - the mail worker, the syslog receiver and the journald follower; - an nginx virtual host that sets TRUST_PROXY. nix/test.nix boots a machine with the module and nginx. Its client signs in as the configured administrator, then saves, searches and downloads a timeline as .och. CI builds the packages on both architectures and runs the test (nix.yml); releases push to Cachix once a cache is configured. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/commit/9fa195d6cc58ba24f47181715a270d14a12b7cb1