ci-actions/site-lib/flake.nix
Christopher Mühl 55652569b2
feat: add deploy-static-site action, site-lib, images; remove deploy-oci-site
Content now served from S3 at runtime via shared static-server image.
- deploy-static-site: reads creds from Nomad vars, builds site, pushes
  tarball to S3, generates per-domain Nomad job JSON, deploys
- generate-job.py: emits Nomad job JSON for a static site deployment
- site-lib/flake.nix: mkSite helper, packages.default + devShells only
- images/flake.nix: shared static-server OCI image (sws + awscli2 + tools)
- images CI: builds and pushes static-server on images/flake.nix changes
- deploy-oci-site: removed (superseded by deploy-static-site)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-18 11:27:27 +01:00

35 lines
783 B
Nix

{
description = "Shared Nix library for static site flakes";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }: {
lib.mkSite =
{ self
, nixpkgs
, src
, system ? "x86_64-linux"
, buildPhase ? "true"
, installPhase ? ''
mkdir -p $out
cp -r dist/. $out/
''
, devPackages ? []
}:
let
pkgs = nixpkgs.legacyPackages.${system};
site = pkgs.stdenv.mkDerivation {
name = "site";
inherit src buildPhase installPhase;
};
in
{
packages.${system}.default = site;
devShells.${system}.default = pkgs.mkShell {
packages = devPackages;
};
};
};
}