Our Personal Data Server from scratch!
0
fork

Configure Feed

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

add nix package, devshell and an .envrc

authored by

nelind and committed by tangled.org ac792fdd 091d6d96

+124
+1
.envrc
··· 1 + use flake;
+2
.gitignore
··· 1 1 /target 2 2 .env 3 + .direnv 4 + .result 3 5 reference-pds-hailey/ 4 6 reference-pds-bsky/ 5 7 reference-relay-indigo/
+37
default.nix
··· 1 + { 2 + lib, 3 + rustPlatform, 4 + pkg-config, 5 + openssl, 6 + }: let 7 + toml = (lib.importTOML ./Cargo.toml).package; 8 + in rustPlatform.buildRustPackage { 9 + pname = "tranquil-pds"; 10 + inherit (toml) version; 11 + 12 + src = lib.fileset.toSource { 13 + root = ./.; 14 + fileset = lib.fileset.intersection (lib.fileset.fromSource (lib.sources.cleanSource ./.)) ( 15 + lib.fileset.unions [ 16 + ./Cargo.toml 17 + ./Cargo.lock 18 + ./src 19 + ./.sqlx 20 + ./migrations 21 + ./frontend 22 + ] 23 + ); 24 + }; 25 + 26 + nativeBuildInputs = [ 27 + pkg-config 28 + ]; 29 + 30 + buildInputs = [ 31 + openssl 32 + ]; 33 + 34 + cargoLock.lockFile = ./Cargo.lock; 35 + 36 + doCheck = false; 37 + }
+27
flake.lock
··· 1 + { 2 + "nodes": { 3 + "nixpkgs": { 4 + "locked": { 5 + "lastModified": 1766314097, 6 + "narHash": "sha256-laJftWbghBehazn/zxVJ8NdENVgjccsWAdAqKXhErrM=", 7 + "owner": "nixos", 8 + "repo": "nixpkgs", 9 + "rev": "306ea70f9eb0fb4e040f8540e2deab32ed7e2055", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "owner": "nixos", 14 + "ref": "nixpkgs-unstable", 15 + "repo": "nixpkgs", 16 + "type": "github" 17 + } 18 + }, 19 + "root": { 20 + "inputs": { 21 + "nixpkgs": "nixpkgs" 22 + } 23 + } 24 + }, 25 + "root": "root", 26 + "version": 7 27 + }
+19
flake.nix
··· 1 + { 2 + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; 3 + outputs = { self, nixpkgs, ... }: let 4 + forAllSystems = 5 + function: 6 + nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed ( 7 + system: function nixpkgs.legacyPackages.${system} 8 + ); 9 + in { 10 + packages = forAllSystems (pkgs: { 11 + tranquil-pds = pkgs.callPackage ./default.nix { }; 12 + default = self.packages.${pkgs.stdenv.hostPlatform.system}.tranquil-pds; 13 + }); 14 + 15 + devShells = forAllSystems (pkgs: { 16 + default = pkgs.callPackage ./shell.nix { }; 17 + }); 18 + }; 19 + }
+38
shell.nix
··· 1 + { 2 + mkShell, 3 + callPackage, 4 + rustPlatform, 5 + 6 + # repo tooling 7 + just, 8 + podman, 9 + podman-compose, 10 + 11 + # rust tooling 12 + clippy, 13 + rustfmt, 14 + rust-analyzer, 15 + 16 + # frontend tooling 17 + deno, 18 + }: let 19 + defaultPackage = callPackage ./default.nix { }; 20 + in mkShell { 21 + inputsFrom = [ defaultPackage ]; 22 + 23 + env = { 24 + RUST_SRC_PATH = rustPlatform.rustLibSrc; 25 + }; 26 + 27 + packages = [ 28 + just 29 + podman 30 + podman-compose 31 + 32 + clippy 33 + rustfmt 34 + rust-analyzer 35 + 36 + deno 37 + ]; 38 + }