Something went wrong. Try again.
mount an atproto PDS repository as a FUSE filesystem oppi.li/posts/mounting_the_atmosphere
atproto pds
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293{ description = "pdsfs - mount an atproto PDS repository as a FUSE filesystem";
inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; rust-overlay.url = "github:oxalica/rust-overlay"; flake-utils.url = "github:numtide/flake-utils"; };
outputs = { self, nixpkgs, rust-overlay, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let overlays = [ (import rust-overlay) ]; pkgs = import nixpkgs { inherit system overlays; };
rustToolchain = if builtins.pathExists ./rust-toolchain.toml then pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml else pkgs.rust-bin.stable.latest.default.override { extensions = [ "rust-src" "rust-analyzer" ]; };
nativeBuildInputs = with pkgs; [ rustToolchain pkg-config ];
buildInputs = with pkgs; [ fuse3 openssl ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.CoreServices ];
pdsfs = pkgs.rustPlatform.buildRustPackage { pname = "pdsfs"; version = "0.1.0";
src = ./.;
cargoLock = { lockFile = ./Cargo.lock; };
inherit nativeBuildInputs buildInputs;
# Skip tests that require network access or FUSE capabilities doCheck = false;
meta = with pkgs.lib; { description = "Mount an atproto PDS repository as a FUSE filesystem"; homepage = "https://github.com/tangled/pdsfs"; # Update with actual repository URL license = licenses.mit; # Update with actual license maintainers = [ ]; # Add maintainers if desired platforms = platforms.linux ++ platforms.darwin; }; }; in { packages = { default = pdsfs; pdsfs = pdsfs; };
devShells.default = pkgs.mkShell { inherit buildInputs nativeBuildInputs;
shellHook = '' echo "pdsfs development environment" echo "Run 'cargo build' to build the project" echo "Run 'cargo run -- <handle>' to mount a PDS repository" echo "" echo "FUSE development notes:" echo "- Ensure you have FUSE permissions (add user to 'fuse' group if needed)" echo "- Use 'fusermount -u <mountpoint>' to unmount if needed" ''; };
# Allow building with different Rust versions devShells.rust-nightly = pkgs.mkShell { buildInputs = buildInputs ++ [ (pkgs.rust-bin.nightly.latest.default.override { extensions = [ "rust-src" "rust-analyzer" ]; }) pkgs.pkg-config ]; }; });}