Initial commit: Logos Bible Software flake

- logos: WINE-based desktop app (offline-capable)
- logos-web: Electron wrapper for web app
- logos-install: one-time GUI installer
This commit is contained in:
cos Agent 2026-05-15 19:30:15 -07:00
commit f79a4784b4
10 changed files with 376 additions and 0 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
node_modules/
.result/
.direnv/
*.exe

36
README.md Normal file
View file

@ -0,0 +1,36 @@
# Logos Bible Software on NixOS
Nix flake providing:
- **`logos`** — Full Logos desktop app via WINE (offline-capable)
- **`logos-web`** — Lightweight Electron wrapper around app.logos.com
- **`logos-install`** — GUI installer that sets up WINE + downloads Logos
## Quick start
```bash
# Install the full desktop app (requires display — run from desktop)
nix run github:sscoble/logos-app#install
# Launch Logos (after install)
nix run github:sscoble/logos-app
# Or use the web wrapper (no install needed)
nix run github:sscoble/logos-app#web
```
## What's what
| Command | What it does | Offline? |
|---------|-------------|----------|
| `logos` | Windows Logos desktop app under WINE | ✅ Yes |
| `logos-web` | Electron wrapper around app.logos.com | ❌ No |
| `logos-install` | One-time setup: WINE prefix + Logos installer GUI | — |
## Offline setup
1. Run `logos-install` from your desktop
2. Sign into your Faithlife account in the Logos installer
3. Let Logos download your library resources
4. Subsequent launches with `logos` work fully offline
Data lives at `~/.local/share/logos-wine/` — back it up to keep your library.

152
flake.nix Normal file
View file

@ -0,0 +1,152 @@
{
description = "Logos Bible Software — Electron wrapper + WINE installer for NixOS";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
# Shared user data path for persistent storage
dataDir = "$HOME/.local/share/logos-app";
# ── Electron web wrapper ──────────────────────────
logos-electron = pkgs.writeShellApplication {
name = "logos-web";
runtimeInputs = [ pkgs.electron ];
text = ''
mkdir -p "${dataDir}"
exec electron "${./main.js}"
'';
};
# ── WINE launcher (after desktop install) ──────────
logos-wine = pkgs.writeShellApplication {
name = "logos";
runtimeInputs = [ pkgs.wineWow64Packages.stagingFull ];
text = ''
WINEPREFIX="''${WINEPREFIX:-$HOME/.local/share/logos-wine}"
export WINEPREFIX WINEARCH=win64
LOGOS_EXE="$WINEPREFIX/drive_c/users/$USER/AppData/Local/Logos/Logos.exe"
if [ ! -f "$LOGOS_EXE" ]; then
echo "Logos not installed yet. Run: logos-install"
exit 1
fi
exec wine "$LOGOS_EXE" "$@"
'';
};
# ── Installer script ───────────────────────────────
logos-install = pkgs.writeShellApplication {
name = "logos-install";
runtimeInputs = with pkgs; [ wineWow64Packages.stagingFull winetricks wget ];
text = ''
set -e
WINEPREFIX="''${WINEPREFIX:-$HOME/.local/share/logos-wine}"
export WINEPREFIX WINEARCH=win64
if [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then
echo "ERROR: No display. Run from your desktop, not SSH."
exit 1
fi
echo "=== Logos Installer ==="
# Init WINE prefix
if [ ! -d "$WINEPREFIX" ]; then
echo "[1/3] Creating WINE prefix..."
wineboot -i && wineserver -w
winecfg -v win10
winetricks -q corefonts
else
echo "[1/3] WINE prefix exists"
fi
# Download installer
INSTALLER="/tmp/LogosSetup.exe"
if [ ! -f "$INSTALLER" ]; then
echo "[2/3] Downloading Logos installer..."
wget -q --show-progress -O "$INSTALLER" \
"https://downloads.logoscdn.com/LBS10/Installer/LogosSetup.exe"
else
echo "[2/3] Installer cached"
fi
echo "[3/3] Running installer — follow the GUI..."
wine "$INSTALLER"
echo "Done. Launch with: logos"
'';
};
# ── Desktop entries ────────────────────────────────
logos-desktop = pkgs.makeDesktopItem {
name = "logos";
exec = "logos";
icon = "logos";
desktopName = "Logos Bible Software";
comment = "Bible study and research (WINE)";
categories = [ "Education" "Office" ];
terminal = false;
};
logos-web-desktop = pkgs.makeDesktopItem {
name = "logos-web";
exec = "logos-web";
icon = "logos-web";
desktopName = "Logos (Web)";
comment = "Logos web app wrapper";
categories = [ "Education" "Office" ];
terminal = false;
};
in
{
packages = {
default = logos-wine;
logos = logos-wine;
logos-web = logos-electron;
logos-install = logos-install;
logos-full = pkgs.symlinkJoin {
name = "logos-full";
paths = [
logos-wine
logos-electron
logos-install
logos-desktop
logos-web-desktop
];
};
};
apps = {
default = {
type = "app";
program = "${logos-wine}/bin/logos";
};
web = {
type = "app";
program = "${logos-electron}/bin/logos-web";
};
install = {
type = "app";
program = "${logos-install}/bin/logos-install";
};
};
devShells.default = pkgs.mkShell {
packages = with pkgs; [
wineWow64Packages.stagingFull
winetricks
electron
];
};
}
);
}

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

4
icon.svg Normal file
View file

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256">
<rect width="256" height="256" rx="32" fill="#1a1a2e"/>
<text x="128" y="170" font-size="120" text-anchor="middle" fill="#c9a96e">📖</text>
</svg>

After

Width:  |  Height:  |  Size: 241 B

80
install-logos.sh Executable file
View file

@ -0,0 +1,80 @@
#!/usr/bin/env bash
# Logos Bible Software — WINE installer for NixOS
# Run this from your desktop terminal (not SSH — needs display)
set -e
WINEPREFIX="${WINEPREFIX:-$HOME/.local/share/logos-wine}"
WINEARCH="win64"
LOGOS_INSTALLER_URL="https://downloads.logoscdn.com/LBS10/Installer/LogosSetup.exe"
echo "=== Logos Bible Software Installer for NixOS ==="
echo "WINE prefix: $WINEPREFIX"
echo ""
# Check for display
if [ -z "$DISPLAY" ]; then
echo "ERROR: No display found. Run this from your desktop, not SSH."
exit 1
fi
# Step 1: Initialize WINE prefix if needed
if [ ! -d "$WINEPREFIX" ]; then
echo "[1/4] Creating WINE prefix..."
nix-shell -p wineWow64Packages.stagingFull winetricks --command "
export WINEPREFIX='$WINEPREFIX'
export WINEARCH='$WINEARCH'
wineboot -i
wineserver -w
winecfg -v win10
winetricks -q corefonts
"
echo "✓ WINE prefix ready"
else
echo "[1/4] ✓ WINE prefix exists"
fi
# Step 2: Download installer (skip if exists)
INSTALLER="/tmp/LogosSetup.exe"
if [ ! -f "$INSTALLER" ]; then
echo "[2/4] Downloading Logos installer..."
wget -q --show-progress -O "$INSTALLER" "$LOGOS_INSTALLER_URL" || {
echo "Download failed. Trying alternate URL..."
wget -q --show-progress -O "$INSTALLER" "https://downloads.logoscdn.com/LBS10/Installer/Logos-x64.msi"
}
echo "✓ Downloaded"
else
echo "[2/4] ✓ Installer already downloaded"
fi
# Step 3: Install Logos
echo "[3/4] Running Logos installer — follow the GUI prompts..."
nix-shell -p wineWow64Packages.stagingFull --command "
export WINEPREFIX='$WINEPREFIX'
export WINEARCH='$WINEARCH'
wine '$INSTALLER'
"
echo "✓ Installation complete"
# Step 4: Create launcher
echo "[4/4] Creating desktop launcher..."
LAUNCHER="$HOME/.local/share/applications/logos-bible.desktop"
cat > "$LAUNCHER" << DESKTOPEOF
[Desktop Entry]
Name=Logos Bible Software
Comment=Bible study and research tool (WINE)
Exec=nix-shell -p wineWow64Packages.stagingFull --command "WINEPREFIX=$WINEPREFIX WINEARCH=$WINEARCH wine C:\\\\users\\\\$USER\\\\AppData\\\\Local\\\\Logos\\\\Logos.exe"
Icon=logos-bible
Terminal=false
Type=Application
Categories=Education;Office;
StartupWMClass=logos.exe
DESKTOPEOF
echo "✓ Desktop launcher created at $LAUNCHER"
echo ""
echo "=== Done! ==="
echo "Launch Logos from your application menu, or run:"
echo " nix-shell -p wineWow64Packages.stagingFull --command \"WINEPREFIX=$WINEPREFIX wine 'C:\\\\users\\\\$USER\\\\AppData\\\\Local\\\\Logos\\\\Logos.exe'\""
echo ""
echo "First launch: sign in with your Faithlife account, then download your library for offline use."

32
launch-logos.sh Executable file
View file

@ -0,0 +1,32 @@
#!/usr/bin/env bash
# Launch Logos Bible Software under WINE
# Run from desktop terminal or use the .desktop file
WINEPREFIX="${WINEPREFIX:-$HOME/.local/share/logos-wine}"
WINEARCH="win64"
# Try multiple possible Logos install paths
LOGOS_PATH=""
for path in \
"$WINEPREFIX/drive_c/users/$USER/AppData/Local/Logos/Logos.exe" \
"$WINEPREFIX/drive_c/Program Files/Logos/Logos.exe" \
"$WINEPREFIX/drive_c/Program Files (x86)/Logos/Logos.exe"; do
if [ -f "$path" ]; then
LOGOS_PATH="$path"
break
fi
done
if [ -z "$LOGOS_PATH" ]; then
echo "Logos not found. Run install-logos.sh first."
exit 1
fi
# Convert to WINE path
WINE_PATH="C:\\\\users\\\\$USER\\\\AppData\\\\Local\\\\Logos\\\\Logos.exe"
exec nix-shell -p wineWow64Packages.stagingFull --command "
export WINEPREFIX='$WINEPREFIX'
export WINEARCH='$WINEARCH'
wine '$WINE_PATH'
"

10
logos.sh Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Logos Bible Software — Electron wrapper launcher
# Requires: electron (from nixpkgs)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Ensure data directory exists
mkdir -p "$HOME/.local/share/logos-app"
exec electron "$SCRIPT_DIR/main.js" "$@"

52
main.js Normal file
View file

@ -0,0 +1,52 @@
const { app, BrowserWindow, session, shell } = require('electron');
const path = require('path');
// Use a dedicated data directory for persistent storage
const userDataPath = path.join(app.getPath('home'), '.local/share/logos-app');
app.setPath('userData', userDataPath);
function createWindow() {
const win = new BrowserWindow({
width: 1400,
height: 900,
minWidth: 900,
minHeight: 600,
title: 'Logos Bible Software',
icon: path.join(__dirname, 'icon.svg'),
webPreferences: {
nodeIntegration: false,
contextIsolation: true,
partition: 'persist:logos',
// Allow IndexedDB, localStorage, and Cache API to persist
enableRemoteModule: false,
},
});
// Load Logos web app
win.loadURL('https://app.logos.com');
// Keep external links in the app when they're Faithlife domains
win.webContents.setWindowOpenHandler(({ url }) => {
if (url.includes('logos.com') || url.includes('faithlife.com') || url.includes('biblia.com')) {
return { action: 'allow', overrideBrowserWindowOptions: {
webPreferences: { partition: 'persist:logos' }
}};
}
shell.openExternal(url);
return { action: 'deny' };
});
// Chrome user agent for full web app support
win.webContents.userAgent =
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36';
}
app.whenReady().then(createWindow);
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') app.quit();
});
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) createWindow();
});

6
package.json Normal file
View file

@ -0,0 +1,6 @@
{
"name": "logos-app",
"version": "1.0.0",
"description": "Logos Bible Software — Nix flake for Electron wrapper + WINE install",
"private": true
}