From 6a825d1e83d408f10d2d84dc214f559d6fde3b5e Mon Sep 17 00:00:00 2001 From: Kyle J Turpin Date: Sat, 23 May 2026 09:53:29 -0500 Subject: [PATCH] Rename project to FeDIY and update related configurations and documentation --- Cargo.toml | 2 +- README.md | 14 +++++++------- default.nix | 16 ++++++++-------- flake.nix | 10 +++++----- flatpak/app.flatpak.json | 11 ++++++----- project.toml | 6 +++--- 6 files changed, 30 insertions(+), 29 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9e619e5..ed143a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "sample-rust-app" +name = "fediy" version = "0.1.0" edition = "2021" diff --git a/README.md b/README.md index ed5b83a..88eebc8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Rust Nix Flake Template +# FeDIY -This template provides a reproducible Rust development environment using Nix flakes and the fenix toolchain. +FeDIY provides a reproducible Rust development environment using Nix flakes and the fenix toolchain. ## Quick Start @@ -44,7 +44,7 @@ The devShell automatically installs common embedded Rust targets via `rustup`: ## Flatpak Packaging -This template supports building Flatpak packages for your Rust application. +This project supports building Flatpak packages for the FeDIY application. ### Build Flatpak Package @@ -66,8 +66,8 @@ Edit `flatpak/app.flatpak.json` to update app ID, runtime, build commands, or so You can install and run the built Flatpak locally: ```bash -flatpak install --user build-flatpak/org.example.rustdevshell.flatpak -flatpak run org.example.rustdevshell +flatpak install --user build-flatpak/com.moturpin.fediy.flatpak +flatpak run com.moturpin.fediy ``` ## Included Tools @@ -153,10 +153,10 @@ See project.toml for example metadata. ## Packaging for nixpkgs -This template is structured for easy packaging in nixpkgs: +This project is structured for packaging in nixpkgs: - All sources in `src/` -- `flake.nix` provides a devShell and template +- `flake.nix` provides a devShell and package outputs - Add a `default.nix` or package expression as needed for nixpkgs See [nixpkgs Rust packaging docs](https://nixos.org/manual/nixpkgs/stable/#rust) for more details. diff --git a/default.nix b/default.nix index 9bfc4d3..ba7b154 100644 --- a/default.nix +++ b/default.nix @@ -1,28 +1,28 @@ { pkgs }: let lib = pkgs.lib; - templateName = builtins.baseNameOf (toString ./.); + projectName = builtins.baseNameOf (toString ./.); in { - ${templateName} = pkgs.stdenvNoCC.mkDerivation { - pname = templateName; + ${projectName} = pkgs.stdenvNoCC.mkDerivation { + pname = projectName; version = "0.1.0"; src = ./.; dontBuild = true; installPhase = '' - mkdir -p $out/share/${templateName} + mkdir -p $out/share/${projectName} if [ -d src ]; then - cp -r src $out/share/${templateName}/ + cp -r src $out/share/${projectName}/ fi for f in README.md project.toml flake.nix default.nix shell.nix Makefile .editorconfig .gitignore; do if [ -f "$f" ]; then - cp "$f" $out/share/${templateName}/ + cp "$f" $out/share/${projectName}/ fi done ''; meta = with lib; { - description = "Template project: ${templateName}"; - license = licenses.unfreeRedistributable; + description = "FeDIY project source bundle: ${projectName}"; + license = licenses.cc-by-sa-40; platforms = platforms.all; }; }; diff --git a/flake.nix b/flake.nix index a143cbb..be5db2a 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "A Nix-flake-based Rust development environment"; + description = "FeDIY: a federated ActivityPub DIY platform built in Rust"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; @@ -36,7 +36,7 @@ templates = { default = { path = ./.; - description = "Rust dev environment using fenix; includes a skeletal Cargo project and packaged helper app"; + description = "FeDIY Rust development environment and package outputs"; }; }; @@ -109,7 +109,7 @@ rustup target add riscv32imac-unknown-none-elf >/dev/null 2>&1 || true # ESP32-C3 class echo "Note: ESP32 Xtensa targets require espup/custom toolchains (see esp-rs)." fi - echo "[rust-template] Welcome to the Rust dev shell!" + echo "[FeDIY] Welcome to the Rust dev shell!" echo "Tools: cargo, rustc, clippy, rustfmt, rust-analyzer, probe-rs, espflash, openocd, minicom, elf2uf2-rs, picotool, avrdude, ravedude" echo "Run 'cargo build' to build, or 'nix run .#dev-helper' for a tool summary." echo "See README.md for usage." @@ -121,9 +121,9 @@ packages = forEachSupportedSystem ( { pkgs }: { - # Build the skeletal Cargo project + # Build the FeDIY Cargo project default = pkgs.rustPlatform.buildRustPackage { - pname = "sample-rust-app"; + pname = "fediy"; version = "0.1.0"; src = ./.; cargoLock.lockFile = ./Cargo.lock; diff --git a/flatpak/app.flatpak.json b/flatpak/app.flatpak.json index d096fc6..17ad10a 100644 --- a/flatpak/app.flatpak.json +++ b/flatpak/app.flatpak.json @@ -1,20 +1,21 @@ { - "app-id": "org.example.rustdevshell", + "app-id": "com.moturpin.fediy", "runtime": "org.freedesktop.Platform", "runtime-version": "23.08", "sdk": "org.freedesktop.Sdk", - "command": "rustdevshell-app", + "command": "fediy", "modules": [ { - "name": "rustdevshell-app", + "name": "fediy", "buildsystem": "simple", "build-commands": [ - "cargo build --release" + "cargo build --release", + "install -Dm755 target/release/fediy /app/bin/fediy" ], "sources": [ { "type": "dir", - "path": "../src" + "path": ".." } ] } diff --git a/project.toml b/project.toml index 47f6547..dba7b1d 100644 --- a/project.toml +++ b/project.toml @@ -1,6 +1,6 @@ [project] -name = "rust-template" -description = "A reusable Nix flake template for Rust development." +name = "FeDIY" +description = "A federated ActivityPub DIY project-hosting web application in Rust." version = "0.1.0" authors = ["gooba42 "] -license = "MIT" +license = "CC-BY-SA-4.0"