this repo has no description
0
fork

Configure Feed

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

Create flake and start migrating to Just

+258 -300
-42
.devcontainer/fedora_devenv/devcontainer.Dockerfile
··· 1 - FROM registry.fedoraproject.org/fedora-minimal:latest 2 - SHELL ["/bin/bash", "-o", "pipefail", "-c"] 3 - 4 - # Control these if you need to change the values in the 'devcontainer.json' 5 - # file in the directory. They have matching values. 6 - ARG USERNAME=vscode 7 - ARG USERID=1000 8 - ARG GROUPID=1000 9 - 10 - # Setup the user, basic packages, and python environment. 11 - # Try to keep everything system setup here. 12 - RUN set -ex; \ 13 - dnf5 update -y; \ 14 - dnf5 install --setopt=install_weak_deps=False -y \ 15 - python3-devel python3-wheel tar gcc make git wget which \ 16 - cmake clang++ lldb curl vim procps-ng openssh-clients; \ 17 - \ 18 - python3 -m ensurepip --upgrade; \ 19 - python3 -m pip install --no-cache-dir --upgrade pip; \ 20 - \ 21 - groupadd --gid ${GROUPID} ${USERNAME}; \ 22 - useradd --gid ${GROUPID} --uid ${USERID} -p ${USERNAME} \ 23 - -s /bin/bash -m ${USERNAME}; \ 24 - 25 - ENV MISE_DATA_DIR="/mise" 26 - ENV MISE_CONFIG_DIR="/mise" 27 - ENV MISE_CACHE_DIR="/mise/cache" 28 - ENV MISE_INSTALL_PATH="/usr/local/bin/mise" 29 - ENV PATH="/mise/shims:$PATH" 30 - RUN curl https://mise.run | sh 31 - 32 - # Cleanup the installation and other packages here. 33 - # No more package installation from DNF should happen after this point. 34 - RUN set -ex; \ 35 - dnf5 clean all -y; \ 36 - rm -rf /var/cache/yum/* /var/cache/dnf/* /usr/share/doc/*; 37 - 38 - # Ensure that the container is running the user that was created and the 39 - # workspace matyches what we expect by default. 40 - ENV PYTHONDONTWRITEBYTECODE=1 41 - WORKDIR /home/${USERNAME} 42 - USER ${USERNAME}
-57
.devcontainer/fedora_devenv/devcontainer.json
··· 1 - // Based on https://github.com/danweinerdev/fedora-devcontainer-template/ 2 - { 3 - "containerUser": "vscode", 4 - "remoteUser": "vscode", 5 - "mounts": [], 6 - "customizations": { 7 - "vscode": { 8 - "extensions": [ 9 - "EditorConfig.EditorConfig", 10 - "ms-vscode.cpptools-themes", 11 - "twxs.cmake", 12 - "ms-vscode.cmake-tools" 13 - ], 14 - "settings": { 15 - "files.exclude": { 16 - "**/.classpath": true, 17 - "**/.DS_Store": true, 18 - "**/.factorypath": true, 19 - "**/.git": true, 20 - "**/.project": true, 21 - "**/.settings": true, 22 - "**/*.js": { 23 - "when": "$(basename).ts" 24 - }, 25 - "**/*.js.map": true 26 - }, 27 - "telemetry.telemetryLevel": "off" 28 - } 29 - } 30 - }, 31 - "features": {}, 32 - "name": "Lumina Fedora-based devenv", 33 - "build": { 34 - "dockerfile": "./devcontainer.Dockerfile" 35 - }, 36 - // "features": { 37 - // ghcr.io/devcontainers/features/docker-in-docker:2": {}, 38 - // "ghcr.io/devcontainers-extra/features/mise:1": {} 39 - // }, 40 - // Features to add to the dev container. More info: https://containers.dev/features. 41 - // "features": {}, 42 - // Use 'forwardPorts' to make a list of ports inside the container available locally. 43 - "forwardPorts": [8085], 44 - // Use 'postCreateCommand' to run commands after the container is created. 45 - "postCreateCommand": [ 46 - "mise trust", 47 - "mise use -g usage", 48 - "mise install", 49 - "mkdir -p ~/.local/share/bash-completion/completions", 50 - "mise completion bash --include-bash-completion-lib > ~/.local/share/bash-completion/completions/mise" 51 - ], 52 - "postStartCommand": ["git remote set-url origin ssh://git@codeberg.org/strawmelonjuice/Lumina.git"] 53 - // Configure tool-specific properties. 54 - // "customizations": {}, 55 - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. 56 - // "remoteUser": "root" 57 - }
-27
.devcontainer/ghcodespaces/devcontainer.json
··· 1 - // For format details, see https://aka.ms/devcontainer.json. For config options, see the 2 - // README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu 3 - { 4 - "name": "Lumina devcontainer for GH codespaces", 5 - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile 6 - "image": "mcr.microsoft.com/devcontainers/base:ubuntu", 7 - "features": { 8 - "ghcr.io/devcontainers-extra/features/mise": { 9 - "version": "latest" 10 - }, 11 - "ghcr.io/devcontainers/features/docker-in-docker:2.12.4": { 12 - "version": "latest" 13 - } 14 - }, 15 - 16 - "postCreateCommand": "bash .devcontainer/ghcodespaces/scripts/postCreate.sh", 17 - "postAttachCommand": "bash .devcontainer/ghcodespaces/scripts/postAttach.sh" 18 - 19 - // Use 'forwardPorts' to make a list of ports inside the container available locally. 20 - // "forwardPorts": [], 21 - 22 - // Configure tool-specific properties. 23 - // "customizations": {}, 24 - 25 - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. 26 - // "remoteUser": "root" 27 - }
-32
.devcontainer/ghcodespaces/scripts/podman
··· 1 - #!/usr/bin/env bash 2 - # This script sets up Docker as if it were Podman for compatibility in the devcontainer. 3 - set -euo pipefail 4 - 5 - # Parse arguments to find --name and handle --replace 6 - args=() 7 - container_name="" 8 - has_replace=false 9 - next_is_name=false 10 - 11 - for arg in "$@"; do 12 - if [ "$arg" = "--replace" ]; then 13 - has_replace=true 14 - # Don't add --replace to args (not supported in docker) 15 - elif [ "$arg" = "--name" ]; then 16 - next_is_name=true 17 - args+=("$arg") 18 - elif [ "$next_is_name" = true ]; then 19 - container_name="$arg" 20 - next_is_name=false 21 - args+=("$arg") 22 - else 23 - args+=("$arg") 24 - fi 25 - done 26 - 27 - # If --replace flag was present and we have a container name, remove existing container 28 - if [ "$has_replace" = true ] && [ -n "$container_name" ]; then 29 - docker rm -f "$container_name" >/dev/null 2>&1 || true 30 - fi 31 - 32 - docker "${args[@]}"
-11
.devcontainer/ghcodespaces/scripts/postAttach.sh
··· 1 - #!/usr/bin/env bash 2 - set -euo pipefail 3 - 4 - echo "Running devcontainer post-attach script" 5 - 6 - if command -v mise >/dev/null 2>&1; then 7 - echo "Found mise — running local-devel-prep" 8 - mise run local-devel-prep || true 9 - else 10 - echo "mise not found; skipping local-devel-prep" 11 - fi
-31
.devcontainer/ghcodespaces/scripts/postCreate.sh
··· 1 - #!/usr/bin/env bash 2 - set -euo pipefail 3 - 4 - log() { printf '%s\n' "$1"; } 5 - 6 - log "Running devcontainer post-create script" 7 - 8 - # Set up Podman compatibility script 9 - log "Setting up Podman compatibility script" 10 - sudo cp .devcontainer/ghcodespaces/scripts/podman /usr/local/bin/podman 11 - sudo chmod +x /usr/local/bin/podman 12 - 13 - 14 - # Configure mise if available 15 - if command -v mise >/dev/null 2>&1; then 16 - log "Configuring mise" 17 - mise trust || true 18 - mise use -g usage || true 19 - mise install || true 20 - mkdir -p ~/.local/share/bash-completion/completions 21 - mise completion bash --include-bash-completion-lib > ~/.local/share/bash-completion/completions/mise || true 22 - echo 'eval "$(mise activate bash)"' >> ~/.bashrc 23 - fi 24 - 25 - # Configure git remotes (best-effort, won't fail the script) 26 - log "Configuring git remotes (best-effort)" 27 - git remote set-url origin ssh://git@codeberg.org/strawmelonjuice/Lumina.git || true 28 - git remote add github-remote ssh://git@github.com/strawmelonjuice/lumina.git || true 29 - git remote add strawmeloncode ssh://git@git.strawmelonjuice.com/strawmelonjuice/Lumina.git || true 30 - 31 - log "Post-create script finished"
-33
.devcontainer/ubuntu devenv/devcontainer.json
··· 1 - // The Ubuntu-based devenv is lighter tested than the Fedora based one. 2 - // But in combination with microsoft's stuff, including GitHub codespaces, it's the best performant option. Probably. 3 - // 4 - // That said, you'll have the problem with docker vs. podman. That's yours to deal with. :P (just replace podman in the local devel prep task and most cases should be fine) 5 - 6 - { 7 - "name": "Lumina Ubuntu-based devenv", 8 - "image": "ghcr.io/prulloac/base:ubuntu-24.04", 9 - 10 - // 👇 Features to add to the Dev Container. More info: https://containers.dev/implementors/features. 11 - "features": { 12 - "ghcr.io/devcontainers/features/docker-in-docker:2": {}, 13 - "ghcr.io/devcontainers-extra/features/mise:1": {}, 14 - "ghcr.io/devcontainers/features/rust": { 15 - "version": "latest", 16 - "profile": "default" 17 - } 18 - }, 19 - 20 - // 👇 Use 'forwardPorts' to make a list of ports inside the container available locally. 21 - // "forwardPorts": [], 22 - 23 - "postCreateCommand": [ 24 - "mise trust", 25 - "mise use -g usage", 26 - "mise install", 27 - "mkdir -p ~/.local/share/bash-completion/completions", 28 - "mise completion bash --include-bash-completion-lib > ~/.local/share/bash-completion/completions/mise" 29 - ], 30 - "postStartCommand": ["git remote set-url origin ssh://git@codeberg.org/strawmelonjuice/Lumina.git"] 31 - // 👇 Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. 32 - // "remoteUser": "root" 33 - }
+52
Justfile
··· 1 + default: 2 + @just --list 3 + 4 + [doc("Build the styles for Lumina client")] 5 + [group('building')] 6 + build-styles: 7 + cd ./client/ && bun x @tailwindcss/cli -i ./app.css -o ./priv/static/lumina_client.css 8 + 9 + [doc("Build the server-side of Lumina")] 10 + [group('building')] 11 + build-server: build-client 12 + cargo build 13 + 14 + [doc("Build the server-side of Lumina optimised for release")] 15 + [group('building')] 16 + build-server-release: build-client 17 + cargo build --release 18 + 19 + [doc("Build the client-side of Lumina and it's styles")] 20 + [group('building')] 21 + build-client: build-styles 22 + cd ./client/ &&\ 23 + gleam build --target javascript &&\ 24 + echo 'import { main } from "./lumina_client.mjs";document.addEventListener("DOMContentLoaded", main())' > "./build/dev/javascript/lumina_client/lumina_client.ts" &&\ 25 + bun build ./build/dev/javascript/lumina_client/lumina_client.ts --minify --outfile ./priv/static/lumina_client.min.mjs --target=browser &&\ 26 + bun build ./build/dev/javascript/lumina_client/lumina_client.ts --outfile ./priv/static/lumina_client.mjs --target=browser 27 + 28 + [doc("Prefetch Gleam dependencies to speed up future builds")] 29 + [group('prepare')] 30 + prefetch-gleam-deps: 31 + cd ./client && gleam deps download 32 + 33 + [doc("Install Bun dependencies")] 34 + [group('prepare')] 35 + bun-install: 36 + cd ./client && bun i 37 + 38 + [group('prepare')] 39 + create-data-dirs: 40 + mkdir -p ./data 41 + mkdir -p ./data/postgres 42 + mkdir -p ./data/redis 43 + 44 + [doc("Clean all build artifacts")] 45 + clean-all: 46 + cargo clean 47 + rm -rf ./client/node_modules 48 + rm -rf ./client/build 49 + rm -rf ./client/build/dev/javascript/lumina_client/lumina_client.mjs 50 + rm -rf ./client/build/dev/javascript/lumina_client/lumina_client.ts 51 + rm -rf ./client/priv/static/lumina_client.min.mjs 52 + rm -rf ./client/priv/static/lumina_client.css
+1
client/bun.lock
··· 1 1 { 2 2 "lockfileVersion": 1, 3 + "configVersion": 0, 3 4 "workspaces": { 4 5 "": { 5 6 "dependencies": {
+100
flake.lock
··· 1 + { 2 + "nodes": { 3 + "fenix": { 4 + "inputs": { 5 + "nixpkgs": [ 6 + "nixpkgs" 7 + ], 8 + "rust-analyzer-src": "rust-analyzer-src" 9 + }, 10 + "locked": { 11 + "lastModified": 1770621632, 12 + "narHash": "sha256-pp7visGpp5SYL1O/eF1ZyiSqk4AJ5xkEJXw7pw0f4EI=", 13 + "owner": "nix-community", 14 + "repo": "fenix", 15 + "rev": "de681afb16166786926b05a0b528545ad511507a", 16 + "type": "github" 17 + }, 18 + "original": { 19 + "owner": "nix-community", 20 + "repo": "fenix", 21 + "type": "github" 22 + } 23 + }, 24 + "nixpkgs": { 25 + "locked": { 26 + "lastModified": 1770562336, 27 + "narHash": "sha256-ub1gpAONMFsT/GU2hV6ZWJjur8rJ6kKxdm9IlCT0j84=", 28 + "owner": "NixOS", 29 + "repo": "nixpkgs", 30 + "rev": "d6c71932130818840fc8fe9509cf50be8c64634f", 31 + "type": "github" 32 + }, 33 + "original": { 34 + "owner": "NixOS", 35 + "ref": "nixos-unstable", 36 + "repo": "nixpkgs", 37 + "type": "github" 38 + } 39 + }, 40 + "root": { 41 + "inputs": { 42 + "fenix": "fenix", 43 + "nixpkgs": "nixpkgs", 44 + "utils": "utils" 45 + } 46 + }, 47 + "rust-analyzer-src": { 48 + "flake": false, 49 + "locked": { 50 + "lastModified": 1770616416, 51 + "narHash": "sha256-S6qG5sNG76JitdRRY0dyEq9+n+4TJuqKrFrtTpripAo=", 52 + "owner": "rust-lang", 53 + "repo": "rust-analyzer", 54 + "rev": "c75729db6845c73605115b18d819917dbf6a8972", 55 + "type": "github" 56 + }, 57 + "original": { 58 + "owner": "rust-lang", 59 + "ref": "nightly", 60 + "repo": "rust-analyzer", 61 + "type": "github" 62 + } 63 + }, 64 + "systems": { 65 + "locked": { 66 + "lastModified": 1681028828, 67 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 68 + "owner": "nix-systems", 69 + "repo": "default", 70 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 71 + "type": "github" 72 + }, 73 + "original": { 74 + "owner": "nix-systems", 75 + "repo": "default", 76 + "type": "github" 77 + } 78 + }, 79 + "utils": { 80 + "inputs": { 81 + "systems": "systems" 82 + }, 83 + "locked": { 84 + "lastModified": 1731533236, 85 + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 86 + "owner": "numtide", 87 + "repo": "flake-utils", 88 + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 89 + "type": "github" 90 + }, 91 + "original": { 92 + "owner": "numtide", 93 + "repo": "flake-utils", 94 + "type": "github" 95 + } 96 + } 97 + }, 98 + "root": "root", 99 + "version": 7 100 + }
+68
flake.nix
··· 1 + { 2 + description = "Lumina Development Environment"; 3 + 4 + inputs = { 5 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 + utils.url = "github:numtide/flake-utils"; 7 + fenix = { 8 + url = "github:nix-community/fenix"; 9 + inputs.nixpkgs.follows = "nixpkgs"; 10 + }; 11 + }; 12 + 13 + outputs = 14 + { 15 + nixpkgs, 16 + utils, 17 + fenix, 18 + ... 19 + }: 20 + utils.lib.eachDefaultSystem ( 21 + system: 22 + let 23 + pkgs = import nixpkgs { inherit system; }; 24 + # Define the Rust toolchain using Fenix 25 + rustToolchain = fenix.packages.${system}.stable.withComponents [ 26 + "cargo" 27 + "rustc" 28 + "rustfmt" 29 + "clippy" 30 + "rust-analyzer" 31 + "rust-src" 32 + ]; 33 + in 34 + { 35 + devShells.default = pkgs.mkShell { 36 + buildInputs = with pkgs; [ 37 + # Language tool chains: Rust, Gleam 38 + rustToolchain 39 + gleam 40 + bun 41 + # For tidying and typing 42 + # nodePackages.prettier 43 + 44 + # Helpers on OS level 45 + pkg-config 46 + dbus 47 + 48 + # Podman 49 + podman 50 + 51 + # Runners 52 + watchexec 53 + just 54 + ]; 55 + 56 + shellHook = '' 57 + export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH" 58 + bun i --cwd=client/ 59 + echo "❄️ dev environment loaded" 60 + just --list 61 + echo "use just to run them." 62 + mise tasks 63 + echo "use mise run to run them." 64 + ''; 65 + }; 66 + } 67 + ); 68 + }
+1 -1
mise.toml
··· 15 15 includes = [ 16 16 "./mise/tasks/podman.toml", 17 17 "./mise/tasks/format.toml", 18 - "./mise/tasks/build.toml", 19 18 "./mise/tasks/check.toml", 20 19 "./mise/tasks/run.toml", 20 + "./mise/tasks/moved-to-just.toml", 21 21 ] 22 22 dir = "{{ config_root }}"
-66
mise/tasks/build.toml
··· 1 - # Build-related tasks for Lumina 2 - [build-client] 3 - description = "Build the client-side of Lumina and it's styles" 4 - run = [ 5 - "gleam build --target javascript", 6 - "echo 'import { main } from \"./lumina_client.mjs\";document.addEventListener(\"DOMContentLoaded\", main())' > \"./build/dev/javascript/lumina_client/lumina_client.ts\"", 7 - "bun build ./build/dev/javascript/lumina_client/lumina_client.ts --minify --outfile ./priv/static/lumina_client.min.mjs --target=browser", 8 - "bun build ./build/dev/javascript/lumina_client/lumina_client.ts --outfile ./priv/static/lumina_client.mjs --target=browser", 9 - ] 10 - run_windows = [ 11 - "gleam build --target javascript", 12 - "echo import { main } from `./lumina_client.mjs`;document.addEventListener(`DOMContentLoaded`, main()) > ./build/dev/javascript/lumina_client/lumina_client.ts", 13 - "bun build ./build/dev/javascript/lumina_client/lumina_client.ts --minify --outfile ./priv/static/lumina_client.min.mjs --target=browser", 14 - "bun build ./build/dev/javascript/lumina_client/lumina_client.ts --outfile ./priv/static/lumina_client.mjs --target=browser", 15 - ] 16 - depends = "build-styles" 17 - dir = "./client/" 18 - 19 - [build-styles] 20 - tools."npm:@tailwindcss/cli" = "latest" 21 - description = "Build the styles for Lumina" 22 - depends = "bun-install" 23 - run = ["tailwindcss -i ./app.css -o ./priv/static/lumina_client.css"] 24 - dir = "./client/" 25 - 26 - [bun-install] 27 - description = "Install Bun dependencies" 28 - run = "bun i" 29 - dir = "./client/" 30 - 31 - [prefetch-gleam-deps] 32 - description = "Prefetch Gleam dependencies to speed up future builds" 33 - hide = true 34 - run = "gleam deps download" 35 - dir = "./client/" 36 - 37 - [build-server] 38 - description = "Build the server-side of Lumina" 39 - depends = ["build-client"] 40 - run = ["cargo build"] 41 - 42 - [build-server-release] 43 - description = "Build the server-side of Lumina optimised for release" 44 - depends = ["build-client"] 45 - run = ["cargo build --release"] 46 - 47 - [create-data-dirs] 48 - hide = true 49 - run = ["mkdir -p ./data", "mkdir -p ./data/postgres", "mkdir -p ./data/redis"] 50 - run_windows = [ 51 - "if not exist .\\data mkdir .\\data", 52 - "if not exist .\\data\\redis mkdir .\\data\\redis", 53 - "if not exist .\\data\\postgres mkdir .\\data\\postgres", 54 - ] 55 - 56 - [clean-all] 57 - description = "Clean all build artifacts" 58 - run = [ 59 - "cargo clean", 60 - "rm -rf ./client/node_modules", 61 - "rm -rf ./client/build", 62 - "rm -rf ./client/build/dev/javascript/lumina_client/lumina_client.mjs", 63 - "rm -rf ./client/build/dev/javascript/lumina_client/lumina_client.ts", 64 - "rm -rf ./client/priv/static/lumina_client.min.mjs", 65 - "rm -rf ./client/priv/static/lumina_client.css", 66 - ]
+36
mise/tasks/moved-to-just.toml
··· 1 + # Moved to just, kept here to preserve backwards compatibility. 2 + 3 + [build-styles] 4 + description = "$just build-styles" 5 + run = ["just build-styles"] 6 + 7 + [build-server] 8 + description = "$just build-server" 9 + run = ["just build-server"] 10 + 11 + [build-client] 12 + description = "$just build-client" 13 + run = ["just build-client"] 14 + 15 + [build-server-release] 16 + description = "$just build-server-release" 17 + run = ["just build-server-release"] 18 + 19 + [clean-all] 20 + description = "$just clean-all" 21 + run = [ 22 + "just clean-all" 23 + ] 24 + 25 + [prefetch-gleam-deps] 26 + description = "$just prefetch-gleam-deps" 27 + hide = true 28 + run = "prefetch-gleam-deps" 29 + 30 + [create-data-dirs] 31 + hide = true 32 + run = ["just create-data-dirs"] 33 + 34 + [bun-install] 35 + description = "$just bun-install" 36 + run = "just bun-install"