my pkgs monorepo
1{
2 description = "Ewan's personal package monorepo — TypeScript and Rust packages";
3
4 inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
5
6 outputs = { self, nixpkgs }:
7 let
8 systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
9 forAllSystems = nixpkgs.lib.genAttrs systems;
10 in {
11 packages = forAllSystems (localSystem:
12 let pkgs = nixpkgs.legacyPackages.${localSystem}; in
13 {
14 # PDS landing page static site — SvelteKit adapter-static build.
15 pds-landing = pkgs.callPackage ./packages/pds-landing/default.nix {};
16
17 # Nix config management tools (flake-bump, health-check, gen-diff, server-config)
18 nix-config-tools = pkgs.rustPlatform.buildRustPackage {
19 pname = "nix-config-tools";
20 version = "0.1.0";
21 src = ./packages/nix-config-tools;
22 cargoLock.lockFile = ./packages/nix-config-tools/Cargo.lock;
23 };
24
25 default = self.packages.${localSystem}.nix-config-tools;
26 }
27 );
28
29 apps = forAllSystems (localSystem:
30 let pkg = self.packages.${localSystem}.nix-config-tools; in
31 {
32 flake-bump = { type = "app"; program = "${pkg}/bin/flake-bump"; };
33 gen-diff = { type = "app"; program = "${pkg}/bin/gen-diff"; };
34 health-check = { type = "app"; program = "${pkg}/bin/health-check"; };
35 server-config = { type = "app"; program = "${pkg}/bin/server-config"; };
36 default = self.apps.${localSystem}.flake-bump;
37 }
38 );
39 };
40}