This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / flake.nix
23 kB 649 lines
1{ 2 description = "atproto github"; 3 4 inputs = { 5 nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05"; 6 microvm = { 7 url = "github:microvm-nix/microvm.nix"; 8 inputs.nixpkgs.follows = "nixpkgs"; 9 }; 10 fenix = { 11 url = "github:nix-community/fenix"; 12 inputs.nixpkgs.follows = "nixpkgs"; 13 }; 14 gomod2nix = { 15 url = "github:nix-community/gomod2nix"; 16 inputs.nixpkgs.follows = "nixpkgs"; 17 }; 18 flake-compat = { 19 url = "https://git.lix.systems/lix-project/flake-compat/archive/main.tar.gz"; 20 flake = false; 21 }; 22 indigo = { 23 url = "github:oppiliappan/indigo"; 24 flake = false; 25 }; 26 htmx-src = { 27 url = "https://unpkg.com/htmx.org@2.0.4/dist/htmx.min.js"; 28 flake = false; 29 }; 30 htmx-ws-src = { 31 # strange errors in console that i can't really make out 32 # url = "https://unpkg.com/htmx.org@2.0.4/dist/ext/ws.js"; 33 url = "https://cdn.jsdelivr.net/npm/htmx-ext-ws@2.0.2"; 34 flake = false; 35 }; 36 lucide-src = { 37 url = "https://github.com/lucide-icons/lucide/releases/download/0.536.0/lucide-icons-0.536.0.zip"; 38 flake = false; 39 }; 40 inter-fonts-src = { 41 url = "https://github.com/rsms/inter/releases/download/v4.1/Inter-4.1.zip"; 42 flake = false; 43 }; 44 actor-typeahead-src = { 45 url = "git+https://tangled.org/@jakelazaroff.com/actor-typeahead"; 46 flake = false; 47 }; 48 mermaid-src = { 49 url = "https://cdn.jsdelivr.net/npm/mermaid@11.12.3/dist/mermaid.min.js"; 50 flake = false; 51 }; 52 hls-src = { 53 url = "https://cdn.jsdelivr.net/npm/hls.js@1.5.13/dist/hls.min.js"; 54 flake = false; 55 }; 56 mathjax-src = { 57 url = "https://cdn.jsdelivr.net/npm/mathjax@4.1.2/tex-svg.js"; 58 flake = false; 59 }; 60 ibm-plex-mono-src = { 61 url = "https://github.com/IBM/plex/releases/download/%40ibm%2Fplex-mono%401.1.0/ibm-plex-mono.zip"; 62 flake = false; 63 }; 64 sqlite-lib-src = { 65 url = "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip"; 66 flake = false; 67 }; 68 fetch-tangled = { 69 url = "git+https://tangled.org/isabelroses.com/fetch-tangled"; 70 inputs.nixpkgs.follows = "nixpkgs"; 71 }; 72 }; 73 74 outputs = { 75 self, 76 nixpkgs, 77 fenix, 78 gomod2nix, 79 indigo, 80 htmx-src, 81 htmx-ws-src, 82 lucide-src, 83 inter-fonts-src, 84 sqlite-lib-src, 85 ibm-plex-mono-src, 86 actor-typeahead-src, 87 mermaid-src, 88 hls-src, 89 microvm, 90 fetch-tangled, 91 mathjax-src, 92 ... 93 }: let 94 supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]; 95 forAllSystems = nixpkgs.lib.genAttrs supportedSystems; 96 nixpkgsFor = forAllSystems (system: 97 import nixpkgs { 98 inherit system; 99 overlays = [fetch-tangled.overlays.default]; 100 }); 101 102 mkPackageSet = pkgs: 103 pkgs.lib.makeScope pkgs.newScope (self: { 104 src = let 105 fs = pkgs.lib.fileset; 106 in 107 fs.toSource { 108 root = ./.; 109 fileset = fs.difference (fs.intersection (fs.gitTracked ./.) (fs.fileFilter (file: !(file.hasExt "nix")) ./.)) (fs.maybeMissing ./.jj); 110 }; 111 rustSrc = let 112 fs = pkgs.lib.fileset; 113 in 114 fs.toSource { 115 root = ./.; 116 fileset = 117 fs.intersection 118 (fs.fromSource self.src) 119 (fs.unions [ 120 ./Cargo.toml 121 ./Cargo.lock 122 ./shuttle 123 ./bobbin 124 ]); 125 }; 126 buildGoApplication = 127 (self.callPackage "${gomod2nix}/builder" { 128 gomod2nix = gomod2nix.legacyPackages.${pkgs.stdenv.hostPlatform.system}.gomod2nix; 129 }).buildGoApplication; 130 rustPlatform = pkgs.makeRustPlatform { 131 inherit (fenix.packages.${pkgs.stdenv.hostPlatform.system}.stable) rustc cargo; 132 }; 133 rustPlatformStatic = let 134 system = pkgs.stdenv.hostPlatform.system; 135 muslTarget = pkgs.pkgsStatic.stdenv.hostPlatform.rust.rustcTarget; 136 toolchain = fenix.packages.${system}.combine [ 137 fenix.packages.${system}.stable.cargo 138 fenix.packages.${system}.stable.rustc 139 fenix.packages.${system}.targets.${muslTarget}.stable.rust-std 140 ]; 141 in 142 pkgs.pkgsStatic.makeRustPlatform { 143 cargo = toolchain; 144 rustc = toolchain; 145 }; 146 modules = ./nix/gomod2nix.toml; 147 sqlite-lib = self.callPackage ./nix/pkgs/sqlite-lib.nix { 148 inherit sqlite-lib-src; 149 }; 150 lexgen = self.callPackage ./nix/pkgs/lexgen.nix {inherit indigo;}; 151 goat = self.callPackage ./nix/pkgs/goat.nix {inherit indigo;}; 152 appview-static-files = self.callPackage ./nix/pkgs/appview-static-files.nix { 153 inherit htmx-src htmx-ws-src lucide-src inter-fonts-src ibm-plex-mono-src actor-typeahead-src mermaid-src hls-src mathjax-src; 154 }; 155 web-static-files = self.callPackage ./nix/pkgs/web-static-files.nix { 156 inherit inter-fonts-src ibm-plex-mono-src; 157 }; 158 appview = self.callPackage ./nix/pkgs/appview.nix {}; 159 blog = self.callPackage ./nix/pkgs/blog.nix {}; 160 docs = self.callPackage ./nix/pkgs/docs.nix { 161 inherit inter-fonts-src ibm-plex-mono-src lucide-src; 162 inherit (pkgs) pagefind; 163 }; 164 spindle = self.callPackage ./nix/pkgs/spindle.nix {}; 165 shuttle = self.callPackage ./nix/pkgs/shuttle.nix { 166 src = self.rustSrc; 167 }; 168 shuttle-static = self.callPackage ./nix/pkgs/shuttle.nix { 169 src = self.rustSrc; 170 rustPlatform = self.rustPlatformStatic; 171 }; 172 knot-unwrapped = self.callPackage ./nix/pkgs/knot-unwrapped.nix {}; 173 knot = self.callPackage ./nix/pkgs/knot.nix {}; 174 dolly = self.callPackage ./nix/pkgs/dolly.nix {}; 175 tap = self.callPackage ./nix/pkgs/tap.nix {}; 176 knotmirror = self.callPackage ./nix/pkgs/knotmirror.nix {}; 177 bobbin = self.callPackage ./nix/pkgs/bobbin.nix {}; 178 zoekt-webserver = self.callPackage ./nix/pkgs/zoekt-webserver.nix {}; 179 zoekt-tngl-indexserver = self.callPackage ./nix/pkgs/zoekt-tngl-indexserver.nix {}; 180 }); 181 in { 182 overlays.default = final: prev: { 183 inherit 184 (mkPackageSet final) 185 lexgen 186 goat 187 sqlite-lib 188 spindle 189 shuttle 190 knot-unwrapped 191 knot 192 appview 193 docs 194 dolly 195 tap 196 knotmirror 197 bobbin 198 zoekt-webserver 199 zoekt-tngl-indexserver 200 ; 201 }; 202 203 packages = forAllSystems (system: let 204 pkgs = nixpkgsFor.${system}; 205 linuxPkgs = nixpkgsFor."x86_64-linux"; 206 packages = mkPackageSet pkgs; 207 staticPackages = mkPackageSet pkgs.pkgsStatic; 208 crossPackages = mkPackageSet pkgs.pkgsCross.gnu64.pkgsStatic; 209 in { 210 inherit 211 (packages) 212 appview 213 appview-static-files 214 web-static-files 215 blog 216 lexgen 217 goat 218 spindle 219 knot 220 knot-unwrapped 221 sqlite-lib 222 docs 223 shuttle 224 shuttle-static 225 dolly 226 tap 227 knotmirror 228 bobbin 229 zoekt-webserver 230 zoekt-tngl-indexserver 231 ; 232 233 pkgsStatic-appview = staticPackages.appview; 234 pkgsStatic-knot = staticPackages.knot; 235 pkgsStatic-knot-unwrapped = staticPackages.knot-unwrapped; 236 pkgsStatic-spindle = staticPackages.spindle; 237 pkgsStatic-sqlite-lib = staticPackages.sqlite-lib; 238 pkgsStatic-dolly = staticPackages.dolly; 239 240 pkgsCross-gnu64-pkgsStatic-appview = crossPackages.appview; 241 pkgsCross-gnu64-pkgsStatic-knot = crossPackages.knot; 242 pkgsCross-gnu64-pkgsStatic-knot-unwrapped = crossPackages.knot-unwrapped; 243 pkgsCross-gnu64-pkgsStatic-spindle = crossPackages.spindle; 244 pkgsCross-gnu64-pkgsStatic-dolly = crossPackages.dolly; 245 246 treefmt-wrapper = pkgs.treefmt.withConfig { 247 settings.formatter = { 248 alejandra = { 249 command = pkgs.lib.getExe pkgs.alejandra; 250 includes = ["*.nix"]; 251 }; 252 253 gofmt = { 254 command = pkgs.lib.getExe' pkgs.go "gofmt"; 255 options = ["-w"]; 256 includes = ["*.go"]; 257 }; 258 259 rustfmt = { 260 command = pkgs.lib.getExe' fenix.packages.${system}.stable.rustfmt "rustfmt"; 261 options = ["--edition" "2024"]; 262 includes = ["*.rs"]; 263 excludes = ["**/src/_lex/**"]; 264 }; 265 266 prettier = { 267 command = pkgs.writeShellScript "prettier-wrapper" '' 268 cd web 269 args=() 270 for arg in "$@"; do 271 if [[ "$arg" == web/* ]]; then 272 args+=("''${arg#web/}") 273 else 274 args+=("$arg") 275 fi 276 done 277 exec ${pkgs.lib.getExe pkgs.prettier} "''${args[@]}" 278 ''; 279 options = ["-w"]; 280 includes = [ 281 "web/**/*.cjs" 282 "web/**/*.css" 283 "web/**/*.html" 284 "web/**/*.js" 285 "web/**/*.json" 286 "web/**/*.json5" 287 "web/**/*.jsx" 288 "web/**/*.mdx" 289 "web/**/*.mjs" 290 "web/**/*.scss" 291 "web/**/*.ts" 292 "web/**/*.tsx" 293 "web/**/*.vue" 294 "web/**/*.yaml" 295 "web/**/*.yml" 296 ]; 297 excludes = [ 298 "web/static/**" 299 "web/src/lib/api/lexicons/**" 300 ]; 301 }; 302 }; 303 }; 304 305 spindle-nixos-image = linuxPkgs.callPackage ./nix/pkgs/spindle-nixos-image.nix { 306 nixosSystem = self.nixosConfigurations.spindle-nixos; 307 }; 308 spindle-nixos-image-tarball = linuxPkgs.runCommand "spindle-nixos-image-tarball.tar.gz" {} '' 309 tar -S -C ${self.packages.${system}.spindle-nixos-image} -h -czf $out . 310 ''; 311 312 spindle-alpine-image = let 313 branch = "3.24"; 314 version = "${branch}.0"; 315 arch = "x86_64"; 316 cdn = "https://dl-cdn.alpinelinux.org/alpine/v${branch}/releases/${arch}"; 317 318 shuttle = (mkPackageSet linuxPkgs).shuttle-static; 319 in 320 linuxPkgs.callPackage ./nix/pkgs/spindle-alpine-image.nix { 321 inherit arch shuttle; 322 repositories = [ 323 "https://dl-cdn.alpinelinux.org/alpine/v${branch}/main" 324 "https://dl-cdn.alpinelinux.org/alpine/v${branch}/community" 325 ]; 326 rootfs = linuxPkgs.fetchurl { 327 url = "${cdn}/alpine-minirootfs-${version}-${arch}.tar.gz"; 328 hash = "sha256-3poRwODn6clNs+2K97RQ6vwLE2h71+kZnVUFDyCqCok="; 329 }; 330 kernel = linuxPkgs.fetchurl { 331 url = "${cdn}/netboot-${version}/vmlinuz-virt"; 332 hash = "sha256-Hmv5Ancgx1w+0NeRcfIbV5HuQMqXldB8fG4E3F6irpA="; 333 }; 334 initramfs = linuxPkgs.fetchurl { 335 url = "${cdn}/netboot-${version}/initramfs-virt"; 336 hash = "sha256-ZCWGSaVMOYOmLz1Gwsf2RhYarMqk+tFVA6MMDWiHVJQ="; 337 }; 338 modloop = linuxPkgs.fetchurl { 339 url = "${cdn}/netboot-${version}/modloop-virt"; 340 hash = "sha256-p3yO7yU28k04iT01sOzhDmEYi+Yl7VZs5r3RYsWCBX0="; 341 }; 342 }; 343 spindle-alpine-image-tarball = linuxPkgs.runCommand "spindle-alpine-image-tarball.tar.gz" {} '' 344 tar -S -C ${self.packages.${system}.spindle-alpine-image} -h -czf $out . 345 ''; 346 }); 347 defaultPackage = forAllSystems (system: self.packages.${system}.appview); 348 devShells = forAllSystems (system: let 349 pkgs = nixpkgsFor.${system}; 350 packages' = self.packages.${system}; 351 staticShell = args: 352 (pkgs.mkShell.override { 353 stdenv = pkgs.pkgsStatic.stdenv; 354 }) (args 355 // { 356 nativeBuildInputs = 357 args.nativeBuildInputs 358 ++ pkgs.lib.optionals pkgs.stdenv.isDarwin [ 359 pkgs.darwin.cctools 360 ]; 361 }); 362 in { 363 default = staticShell { 364 nativeBuildInputs = 365 [ 366 pkgs.go 367 pkgs.air 368 pkgs.gopls 369 pkgs.httpie 370 pkgs.litecli 371 pkgs.websocat 372 pkgs.tailwindcss 373 pkgs.nixos-shell 374 pkgs.redis 375 pkgs.worker-build 376 pkgs.cargo-generate 377 pkgs.qemu 378 pkgs.cdrkit 379 pkgs.buf 380 pkgs.protobuf 381 pkgs.protoc-gen-prost 382 pkgs.protoc-gen-prost-crate 383 pkgs.protoc-gen-prost-serde 384 pkgs.protoc-gen-go 385 (fenix.packages.${system}.combine [ 386 fenix.packages.${system}.stable.cargo 387 fenix.packages.${system}.stable.rustc 388 fenix.packages.${system}.stable.rust-src 389 fenix.packages.${system}.stable.clippy 390 fenix.packages.${system}.stable.rustfmt 391 fenix.packages.${system}.targets.wasm32-unknown-unknown.stable.rust-std 392 ]) 393 pkgs.coreutils # for those of us who are on systems that use busybox (alpine) 394 packages'.lexgen 395 packages'.treefmt-wrapper 396 packages'.tap 397 pkgs.e2fsprogs 398 pkgs.util-linux 399 pkgs.pnpm 400 pkgs.nodejs 401 ] 402 ++ pkgs.lib.optionals pkgs.stdenv.isLinux [ 403 pkgs.parted 404 pkgs.slirp4netns 405 pkgs.iproute2 406 ]; 407 shellHook = '' 408 export CC=${pkgs.stdenv.cc}/bin/cc 409 ( 410 cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" 411 mkdir -p appview/pages/static 412 # temporary self-heal for workspaces that copied static assets as read-only 413 [ -d appview/pages/static/icons ] && [ ! -w appview/pages/static/icons ] && chmod -R u+rwX appview/pages/static 414 # no preserve is needed because watch-tailwind will want to be able to overwrite 415 cp -fr --no-preserve=ownership,mode ${packages'.appview-static-files}/* appview/pages/static 416 mkdir -p web/static 417 rm -rf web/static/fonts web/static/logos 418 cp -fr --no-preserve=ownership,mode ${packages'.web-static-files}/* web/static 419 ) 420 export TANGLED_OAUTH_CLIENT_KID="$(date +%s)" 421 export TANGLED_OAUTH_CLIENT_SECRET="$(${packages'.goat}/bin/goat key generate -t P-256 | grep -A1 "Secret Key" | tail -n1 | awk '{print $1}')" 422 # Make xcrun (Nix stub) able to find ld from the system Command Line Tools. 423 # Without this, worker-build/cargo fails with "error: tool 'ld' not found". 424 if [ -d /Library/Developer/CommandLineTools/usr/bin ]; then 425 export PATH=/Library/Developer/CommandLineTools/usr/bin:$PATH 426 fi 427 ''; 428 env.CGO_ENABLED = 1; 429 }; 430 }); 431 apps = forAllSystems (system: let 432 pkgs = nixpkgsFor."${system}"; 433 packages' = self.packages.${system}; 434 air-watcher = name: arg: 435 pkgs.writeShellScriptBin "run" 436 '' 437 export PATH=${pkgs.go}/bin:$PATH 438 ${pkgs.air}/bin/air -c ./.air/${name}.toml \ 439 -build.args_bin "${arg}" 440 ''; 441 tailwind-watcher = 442 pkgs.writeShellScriptBin "run" 443 '' 444 export BROWSERSLIST_IGNORE_OLD_DATA=true 445 ${pkgs.tailwindcss}/bin/tailwindcss --watch=always -i input.css -o ./appview/pages/static/tw.css 446 ''; 447 in { 448 watch-appview = { 449 type = "app"; 450 program = toString (pkgs.writeShellScript "watch-appview" '' 451 echo "copying static files to appview/pages/static..." 452 mkdir -p appview/pages/static 453 ${pkgs.coreutils}/bin/cp -fr --no-preserve=ownership,mode ${packages'.appview-static-files}/* appview/pages/static 454 ${air-watcher "appview" ""}/bin/run 455 ''); 456 }; 457 watch-knot = { 458 type = "app"; 459 program = ''${air-watcher "knot" "server"}/bin/run''; 460 }; 461 watch-spindle = { 462 type = "app"; 463 program = ''${air-watcher "spindle" ""}/bin/run''; 464 }; 465 watch-blog = { 466 type = "app"; 467 program = toString (pkgs.writeShellScript "watch-blog" '' 468 echo "copying static files to appview/pages/static..." 469 mkdir -p appview/pages/static 470 ${pkgs.coreutils}/bin/cp -fr --no-preserve=ownership,mode ${packages'.appview-static-files}/* appview/pages/static 471 ${air-watcher "blog" "serve"}/bin/run 472 ''); 473 }; 474 watch-tailwind = { 475 type = "app"; 476 program = ''${tailwind-watcher}/bin/run''; 477 }; 478 serve-docs = { 479 type = "app"; 480 program = toString (pkgs.writeShellScript "serve-docs" '' 481 echo "building docs..." 482 docsOut=$(nix build --no-link --print-out-paths .#docs) 483 echo "serving docs at http://localhost:1414" 484 cd "$docsOut" 485 exec ${pkgs.python3}/bin/python3 -m http.server 1414 486 ''); 487 }; 488 regenerate-proto = { 489 type = "app"; 490 program = 491 (pkgs.writeShellApplication { 492 name = "regenerate-proto"; 493 runtimeInputs = with pkgs; [git buf coreutils]; 494 text = '' 495 rootDir=$(git rev-parse --show-toplevel 2>/dev/null || pwd) 496 cd "$rootDir" 497 echo ">>> regenerating protobuf files.." 498 buf generate 499 echo ">>> generating file descriptor set for shuttle..." 500 buf build -o shuttle/src/gen/file_descriptor_set.bin 501 echo ">>> done" 502 ''; 503 }) 504 + "/bin/regenerate-proto"; 505 }; 506 vm = let 507 guestSystem = 508 if pkgs.stdenv.hostPlatform.isAarch64 509 then "aarch64-linux" 510 else "x86_64-linux"; 511 in { 512 type = "app"; 513 program = 514 (pkgs.writeShellApplication { 515 name = "launch-vm"; 516 text = '' 517 rootDir=$(jj --ignore-working-copy root || git rev-parse --show-toplevel) || (echo "error: can't find repo root?"; exit 1) 518 cd "$rootDir" 519 520 # Reset TMPDIR in case it points to a stale nix-shell temp dir 521 export TMPDIR=/tmp 522 523 mkdir -p nix/vm-data/{knot,repos,spindle,spindle-logs} 524 525 export TANGLED_VM_DATA_DIR="$rootDir/nix/vm-data" 526 exec ${pkgs.lib.getExe 527 (import ./nix/vm.nix { 528 inherit nixpkgs self; 529 system = guestSystem; 530 hostSystem = system; 531 }).config.system.build.vm} 532 ''; 533 }) 534 + /bin/launch-vm; 535 }; 536 gomod2nix = { 537 type = "app"; 538 program = toString (pkgs.writeShellScript "gomod2nix" '' 539 ${gomod2nix.legacyPackages.${system}.gomod2nix}/bin/gomod2nix generate --outdir ./nix 540 ''); 541 }; 542 lexgen = { 543 type = "app"; 544 program = 545 (pkgs.writeShellApplication { 546 name = "lexgen"; 547 text = '' 548 if ! command -v lexgen > /dev/null; then 549 echo "error: must be executed from devshell" 550 exit 1 551 fi 552 553 rootDir=$(jj --ignore-working-copy root || git rev-parse --show-toplevel) || (echo "error: can't find repo root?"; exit 1) 554 cd "$rootDir" 555 556 # *_ext.go are hand-written extensions; never remove or mutate them 557 find api/tangled -maxdepth 1 -type f -not -name '*_ext.go' -delete 558 lexgen --build-file lexicon-build-config.json lexicons 559 560 # disable type registration temporarily while running cborgen 561 find api/tangled -maxdepth 1 -name '*.go' -not -name '*_ext.go' -exec \ 562 sed -i.bak 's/\tutil/\/\/\tutil/' {} + 563 # lexgen generates incomplete Marshaler/Unmarshaler for union types 564 find api/tangled -maxdepth 1 -name '*.go' -not -name '*_ext.go' -not -name "cbor_gen.go" -exec \ 565 sed -i '/^func.*\(MarshalCBOR\|UnmarshalCBOR\)/,/^}/ s/^/\/\/ /' {} + 566 for f in api/tangled/*_ext.go; do [ -e "''$f" ] && mv "''$f" "''$f.bak"; done 567 ${pkgs.gotools}/bin/goimports -w api/tangled/* 568 CGO_ENABLED=0 go run ./cmd/cborgen/ 569 for f in api/tangled/*_ext.go.bak; do [ -e "''$f" ] && mv "''$f" "''${f%.bak}"; done 570 571 lexgen --build-file lexicon-build-config.json lexicons 572 rm api/tangled/*.bak 573 ''; 574 }) 575 + /bin/lexgen; 576 }; 577 }); 578 579 nixosModules.appview = { 580 lib, 581 pkgs, 582 ... 583 }: { 584 imports = [./nix/modules/appview.nix]; 585 586 services.tangled.appview.package = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.appview; 587 }; 588 nixosModules.knotmirror = { 589 lib, 590 pkgs, 591 ... 592 }: { 593 imports = [./nix/modules/knotmirror.nix]; 594 595 services.tangled.knotmirror.tap-package = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.tap; 596 services.tangled.knotmirror.package = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.knotmirror; 597 }; 598 nixosModules.zoekt-tnglserver = { 599 lib, 600 pkgs, 601 ... 602 }: { 603 imports = [./nix/modules/zoekt-tnglserver.nix]; 604 605 services.tangled.zoekt.package = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.zoekt-tngl-indexserver; 606 services.tangled.zoekt.zoekt-webserver-package = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.zoekt-webserver; 607 }; 608 nixosModules.knot = { 609 lib, 610 pkgs, 611 ... 612 }: { 613 imports = [./nix/modules/knot.nix]; 614 615 services.tangled.knot.package = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.knot; 616 }; 617 nixosModules.spindle = { 618 lib, 619 pkgs, 620 ... 621 }: { 622 imports = [./nix/modules/spindle.nix]; 623 624 services.tangled.spindle.package = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.spindle; 625 }; 626 nixosModules.shuttle = { 627 lib, 628 pkgs, 629 ... 630 }: { 631 imports = [./nix/modules/shuttle.nix]; 632 633 services.tangled.shuttle.package = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.shuttle; 634 }; 635 636 nixosModules.spindle-nixos = import ./nix/microvm/spindle-vm.nix {inherit self microvm;} ./nix/microvm/qemu.nix; 637 638 formatter = forAllSystems (system: self.packages.${system}.treefmt-wrapper); 639 640 nixosConfigurations = let 641 spindleNixosBase = nixpkgs.lib.nixosSystem { 642 system = "x86_64-linux"; 643 modules = [self.nixosModules.spindle-nixos]; 644 }; 645 in { 646 spindle-nixos = spindleNixosBase; 647 }; 648 }; 649}