A Nix flake that packages the official Notion desktop app for Linux by extracting and adapting the Mac version. Features full MCP (Model Context Protocol) integration and native dark mode support.
- ✅ Official Notion App - Extracted from the authentic Mac DMG release
- ✅ Full MCP Integration - Works seamlessly with Claude for AI-powered workflows
- ✅ Native Linux Compatibility - Custom Rust-based SQLite stub for cross-platform support
- ✅ Authentic Icon - Properly extracted from Mac .icns with all standard sizes
- ✅ Comprehensive Dark Mode - Smart system theme detection and native dark UI
- ✅ Wayland & X11 Support - Works on both display servers
- ✅ NixOS Integration - Declarative installation and configuration
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
notion-desktop = {
url = "github:heytcass/notion-mac-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, notion-desktop, ... }: {
nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
# Your existing configuration
{
environment.systemPackages = [
notion-desktop.packages.x86_64-linux.default
];
}
];
};
};
}home.packages = [
inputs.notion-desktop.packages.${pkgs.system}.default
];nix build github:heytcass/notion-mac-flake
./result/bin/notion-desktopThis flake takes a unique approach to running Notion on Linux:
- Official Mac Extraction - Downloads and extracts the authentic Mac Notion.app bundle
- Cross-Platform Adaptation - Replaces Mac-native modules with Linux-compatible alternatives
- SQLite Stub - Custom Rust implementation using NAPI-RS that provides the exact better-sqlite3 API
- Smart Theming - Detects system dark mode preferences and applies them to all UI elements
- Base: Official Notion 4.16.0 Mac release
- Runtime: Electron with Linux-native modules
- SQLite: Custom Rust stub implementing better-sqlite3 API
- Icons: Extracted from Mac .icns using libicns
- Theming: Dynamic dark mode detection with GTK/Qt integration
The custom SQLite stub provides:
- Full better-sqlite3 API compatibility
- Proper error handling and logging
- Transaction support (BEGIN/COMMIT/ROLLBACK)
- Schema introspection capabilities
- Graceful fallback for unsupported operations
- System theme detection via gsettings
- Native Electron dark mode (
--force-dark-mode) - GTK application theming integration
- Qt styling with Adwaita-Dark
- Dynamic switching without restart
- NixOS or Nix with flakes enabled
- x86_64-linux or aarch64-linux architecture
- Desktop environment (for optimal theming)
This package provides a true desktop Notion client that works with:
- Claude's MCP file system integration
- Home Assistant MCP servers
- Custom MCP server implementations
- Any MCP-compatible AI tools
Contributions welcome! This project demonstrates:
- Advanced Nix flake patterns
- Cross-platform Electron app packaging
- Rust FFI with Node.js via NAPI-RS
- macOS to Linux application porting techniques
This flake is MIT licensed. Note that Notion itself remains proprietary software owned by Notion Labs, Inc.
- Inspired by the Claude Desktop Linux flake
- Built with the amazing NixOS ecosystem
- SQLite stub powered by NAPI-RS