941a9da928
- Added goals for defining personal data categories and retention obligations. - Included exit criteria for user-level moderation, personal collections, and self-service data export. - Expanded Phase 2 goals to include remote actor moderation and shareable block lists. chore: Update flake.nix to specify main program - Set the main program for the project in the flake configuration. feat: Add issue templates for bug reports, feature requests, and questions - Created structured templates to streamline issue reporting and feature suggestions. docs: Add pull request template for consistent contributions - Introduced a PR template to guide contributors on providing necessary information. docs: Establish a Code of Conduct for community behavior - Implemented a Code of Conduct to promote a respectful and inclusive environment. docs: Create Diversity, Equity, and Inclusion (DEI) statement - Outlined commitment to diversity and inclusion within the FeDIY community. docs: Define Code Review Guidelines for constructive feedback - Established guidelines to ensure respectful and effective code reviews. docs: Implement Security Policy for vulnerability reporting - Created a security policy detailing how to report vulnerabilities and our commitment to addressing them.
140 lines
4.1 KiB
Nix
140 lines
4.1 KiB
Nix
{
|
|
description = "FeDIY: a federated ActivityPub DIY platform built in Rust";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
fenix = {
|
|
url = "github:nix-community/fenix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
inputs@{ self, ... }:
|
|
let
|
|
supportedSystems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
"x86_64-darwin"
|
|
"aarch64-darwin"
|
|
];
|
|
forEachSupportedSystem =
|
|
f:
|
|
inputs.nixpkgs.lib.genAttrs supportedSystems (
|
|
system:
|
|
f {
|
|
pkgs = import inputs.nixpkgs {
|
|
inherit system;
|
|
overlays = [
|
|
inputs.self.overlays.default
|
|
];
|
|
};
|
|
}
|
|
);
|
|
in
|
|
{
|
|
templates = {
|
|
default = {
|
|
path = ./.;
|
|
description = "FeDIY Rust development environment and package outputs";
|
|
};
|
|
};
|
|
|
|
overlays.default = _final: prev: {
|
|
rustToolchain =
|
|
with inputs.fenix.packages.${prev.stdenv.hostPlatform.system};
|
|
combine (
|
|
with stable;
|
|
[
|
|
clippy
|
|
rustc
|
|
cargo
|
|
rustfmt
|
|
rust-src
|
|
]
|
|
);
|
|
};
|
|
|
|
devShells = forEachSupportedSystem (
|
|
{ pkgs }:
|
|
{
|
|
default = pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
# Rust toolchain (managed by fenix overlay)
|
|
rustToolchain
|
|
rust-analyzer
|
|
# Build essentials
|
|
git
|
|
gnumake
|
|
openssl
|
|
pkg-config
|
|
# Cargo productivity tools
|
|
cargo-deny
|
|
cargo-edit
|
|
cargo-watch
|
|
# Code quality
|
|
pre-commit
|
|
# Packaging
|
|
flatpak-builder
|
|
];
|
|
|
|
env = {
|
|
# Required by rust-analyzer
|
|
RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library";
|
|
};
|
|
|
|
shellHook = ''
|
|
# Initialize git repository if not already present
|
|
if [ ! -d .git ]; then
|
|
git init
|
|
echo "✓ Initialized git repository"
|
|
fi
|
|
|
|
echo "[FeDIY] Welcome to the dev shell!"
|
|
echo "Tools: cargo, rustc, clippy, rustfmt, rust-analyzer, flatpak-builder"
|
|
echo "Run 'cargo build' to build, 'make flatpak-build' for Flatpak, or 'nix run .#dev-helper' for a tool summary."
|
|
echo "See README.md for usage."
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
|
|
packages = forEachSupportedSystem (
|
|
{ pkgs }:
|
|
{
|
|
# Build the FeDIY Cargo project
|
|
default = pkgs.rustPlatform.buildRustPackage {
|
|
pname = "fediy";
|
|
version = "0.1.0";
|
|
src = ./.;
|
|
cargoLock.lockFile = ./Cargo.lock;
|
|
meta.mainProgram = "fediy";
|
|
};
|
|
|
|
devHelper = pkgs.writeShellScriptBin "dev-helper" ''
|
|
echo "=== FeDIY dev shell tools ==="
|
|
command -v cargo >/dev/null 2>&1 && echo "cargo: $(cargo --version)" || echo "cargo: not found"
|
|
command -v rustc >/dev/null 2>&1 && echo "rustc: $(rustc --version)" || echo "rustc: not found"
|
|
command -v rust-analyzer >/dev/null 2>&1 && echo "rust-analyzer: $(rust-analyzer --version)" || echo "rust-analyzer: not found"
|
|
command -v flatpak-builder >/dev/null 2>&1 && echo "flatpak-builder: $(flatpak-builder --version)" || echo "flatpak-builder: not found"
|
|
command -v pre-commit >/dev/null 2>&1 && echo "pre-commit: $(pre-commit --version)" || echo "pre-commit: not found"
|
|
'';
|
|
}
|
|
);
|
|
|
|
apps = forEachSupportedSystem (
|
|
{ pkgs }:
|
|
{
|
|
default = {
|
|
type = "app";
|
|
program = pkgs.lib.getExe self.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
|
};
|
|
dev-helper = {
|
|
type = "app";
|
|
program = pkgs.lib.getExe self.packages.${pkgs.stdenv.hostPlatform.system}.devHelper;
|
|
};
|
|
}
|
|
);
|
|
};
|
|
}
|