Our Personal Data Server from scratch! tranquil.farm
oauth atproto pds rust postgresql objectstorage fun
at ec36b8ddc7776abf7c2350ebe3768c69e33577a9 30 lines 1.1 kB view raw
1{ 2 inputs = { 3 nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; 4 5 # tranquil frontend uses deno as its package manager and build time runtime. 6 # nixpkgs does not have deno support yet but its being worked on in https://github.com/NixOS/nixpkgs/pull/419255 7 # for now we important that PR as well purely for its fetchDenoDeps 8 nixpkgs-fetch-deno.url = "github:aMOPel/nixpkgs/feat/fetchDenoDeps"; 9 }; 10 11 outputs = { self, nixpkgs, ... } @ inputs : let 12 forAllSystems = 13 function: 14 nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed ( 15 system: (function system nixpkgs.legacyPackages.${system}) 16 ); 17 in { 18 packages = forAllSystems (system: pkgs: { 19 tranquil-pds = pkgs.callPackage ./default.nix { }; 20 tranquil-frontend = pkgs.callPackage ./frontend.nix { 21 inherit (inputs.nixpkgs-fetch-deno.legacyPackages.${system}) fetchDenoDeps; 22 }; 23 default = self.packages.${pkgs.stdenv.hostPlatform.system}.tranquil-pds; 24 }); 25 26 devShells = forAllSystems (system: pkgs: { 27 default = pkgs.callPackage ./shell.nix { }; 28 }); 29 }; 30}