[READ-ONLY] Mirror of https://github.com/maybeanerd/booktracker. a multi platform application and server to track your book reading journey
hacktoberfest
0

Configure Feed

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

chore: nix flake with dev shell

authored by

Tibor Pilz and committed by
Sebastian Di Luzio
(Nov 7, 2025, 2:13 PM +0100) bdaa3db6 d5e0dcba

+179
+1
.envrc
··· 1 + use flake
+3
.gitignore
··· 44 44 45 45 # Docker 46 46 .docker/ 47 + 48 + # Direnv 49 + .direnv/
+13
README.md
··· 103 103 pnpm db:studio 104 104 ``` 105 105 106 + #### ❄️ Nix Flake 107 + 108 + This project includes a Nix flake for a reproducible development environment. 109 + 110 + To enter the Nix shell: 111 + ```bash 112 + nix develop 113 + ``` 114 + 115 + This will drop you in a Bash shell with Node, Pnpm, Rust & Tauri. 116 + 117 + You can also use direnv to automatically enter the Nix shell when you `cd` into the project. (More info: https://direnv.net/) 118 + 106 119 ## 🏗️ Building 107 120 108 121 ### Frontend (Tauri App)
+94
flake.lock
··· 1 + { 2 + "nodes": { 3 + "flake-utils": { 4 + "inputs": { 5 + "systems": "systems" 6 + }, 7 + "locked": { 8 + "lastModified": 1731533236, 9 + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 10 + "owner": "numtide", 11 + "repo": "flake-utils", 12 + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 13 + "type": "github" 14 + }, 15 + "original": { 16 + "owner": "numtide", 17 + "repo": "flake-utils", 18 + "type": "github" 19 + } 20 + }, 21 + "nixpkgs": { 22 + "locked": { 23 + "lastModified": 1762361079, 24 + "narHash": "sha256-lz718rr1BDpZBYk7+G8cE6wee3PiBUpn8aomG/vLLiY=", 25 + "owner": "NixOS", 26 + "repo": "nixpkgs", 27 + "rev": "ffcdcf99d65c61956d882df249a9be53e5902ea5", 28 + "type": "github" 29 + }, 30 + "original": { 31 + "id": "nixpkgs", 32 + "type": "indirect" 33 + } 34 + }, 35 + "nixpkgs_2": { 36 + "locked": { 37 + "lastModified": 1744536153, 38 + "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", 39 + "owner": "NixOS", 40 + "repo": "nixpkgs", 41 + "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", 42 + "type": "github" 43 + }, 44 + "original": { 45 + "owner": "NixOS", 46 + "ref": "nixpkgs-unstable", 47 + "repo": "nixpkgs", 48 + "type": "github" 49 + } 50 + }, 51 + "root": { 52 + "inputs": { 53 + "flake-utils": "flake-utils", 54 + "nixpkgs": "nixpkgs", 55 + "rust-overlay": "rust-overlay" 56 + } 57 + }, 58 + "rust-overlay": { 59 + "inputs": { 60 + "nixpkgs": "nixpkgs_2" 61 + }, 62 + "locked": { 63 + "lastModified": 1762483116, 64 + "narHash": "sha256-Z8EVsTH10BjCdFyPxbUu5jBV+HGL39rh9+beQcnNRm0=", 65 + "owner": "oxalica", 66 + "repo": "rust-overlay", 67 + "rev": "9de55b59b6aaadbd9dbf223765a835239b767ee5", 68 + "type": "github" 69 + }, 70 + "original": { 71 + "owner": "oxalica", 72 + "repo": "rust-overlay", 73 + "type": "github" 74 + } 75 + }, 76 + "systems": { 77 + "locked": { 78 + "lastModified": 1681028828, 79 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 80 + "owner": "nix-systems", 81 + "repo": "default", 82 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 83 + "type": "github" 84 + }, 85 + "original": { 86 + "owner": "nix-systems", 87 + "repo": "default", 88 + "type": "github" 89 + } 90 + } 91 + }, 92 + "root": "root", 93 + "version": 7 94 + }
+64
flake.nix
··· 1 + { 2 + inputs = { 3 + nixpkgs.url = "nixpkgs"; 4 + flake-utils.url = "github:numtide/flake-utils"; 5 + rust-overlay.url = "github:oxalica/rust-overlay"; 6 + }; 7 + 8 + outputs = { self, nixpkgs, flake-utils, rust-overlay }: 9 + flake-utils.lib.eachDefaultSystem (system: 10 + let 11 + pkgs = import nixpkgs { 12 + inherit system; 13 + overlays = [ rust-overlay.overlays.default ]; 14 + }; 15 + 16 + toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; 17 + 18 + packages = with pkgs; [ 19 + nodejs_24 20 + cargo 21 + cargo-tauri 22 + toolchain 23 + rust-analyzer-unwrapped 24 + nodePackages.pnpm 25 + ]; 26 + 27 + 28 + nativeBuildPackages = with pkgs; [ 29 + pkg-config 30 + dbus 31 + openssl 32 + glib 33 + gtk3 34 + librsvg 35 + ]; 36 + 37 + libraries = with pkgs; [ 38 + gtk3 39 + cairo 40 + gdk-pixbuf 41 + glib 42 + dbus 43 + openssl 44 + librsvg 45 + ]; 46 + 47 + in { 48 + devShells.default = pkgs.mkShell { 49 + buildInputs = packages; 50 + nativeBuildInputs = nativeBuildPackages; 51 + 52 + shellHook = with pkgs; '' 53 + export LD_LIBRARY_PATH="${ 54 + lib.makeLibraryPath libraries 55 + }:$LD_LIBRARY_PATH" 56 + export OPENSSL_INCLUDE_DIR="${openssl.dev}/include/openssl" 57 + export OPENSSL_LIB_DIR="${openssl.out}/lib" 58 + export OPENSSL_ROOT_DIR="${openssl.out}" 59 + export RUST_SRC_PATH="${toolchain}/lib/rustlib/src/rust/library" 60 + ''; 61 + }; 62 + }); 63 + } 64 +
+4
rust-toolchain.toml
··· 1 + [toolchain] 2 + channel = "stable" 3 + components = ["rustfmt", "clippy", "rust-src"] 4 + targets = ["x86_64-unknown-linux-gnu", "aarch64-apple-darwin"]