Overview
The Droid modules provide:- User profile integration with the home configuration system
- Nix configuration optimized for mobile devices
- Automatic home module imports for compatible configurations
Module Structure
User Management
The users module integrates Nix-on-Droid with the home configuration system.Options
The username for the Nix-on-Droid environment.
The shell to use for the user.
Home Manager Integration
When a username is set, the module automatically imports home configurations from:homes/<username>/default.nix- Primary user configurationhomes/<username>@global/default.nix- Global settings across all platformshomes/<username>@droid/default.nix- Droid-specific overrides
Shell Integration
The Fish shell is automatically enabled in Home Manager when selected:Example Configuration
- Set the user shell to Fish
- Import
homes/soriphoono/default.nix - Import
homes/soriphoono@global/default.nix(if exists) - Import
homes/soriphoono@droid/default.nix(if exists) - Enable Fish shell in Home Manager
Nix Configuration
Optimized Nix daemon settings for mobile devices.Installed Packages
Nix Settings
The module configures Nix with mobile-optimized settings:Experimental Features
- nix-command - New
nixCLI interface - flakes - Flake support for reproducible configurations
Flake Registry
Resource Limits
Trusted Users
Binary Caches
- cache.nixos.org - Official NixOS cache
- nix-community.cachix.org - Community packages
- numtide.cachix.org - Numtide packages
Flake Registry and Nix Path
The module automatically syncs the flake registry andNIX_PATH with flake inputs:
nix-channel and legacy Nix commands work with flake inputs.
Home Module Compatibility
Nix-on-Droid can use most home modules with some adaptations:Compatible Modules
- Core Modules (with adjustments):
- Git configuration
- Secrets management
- Shell configuration (Fish, Starship)
- SSH management
- User Applications:
- Development tools (Neovim, editors)
- Terminal applications
- CLI utilities
Incompatible Features
- Fastfetch - Disabled on Droid (
isDroidparameter) - GUI Applications - Browsers, GUI editors, desktop apps
- System Services - SystemD user services (use Termux services instead)
- XDG MIME types - No desktop environment integration
Droid-Specific Adaptations
Modules can detect Droid environment:isDroid parameter is passed to home modules automatically.
Complete Example
A full Nix-on-Droid configuration:Directory Structure
Recommended structure for Droid configurations:@global and @droid suffixes create isolated configuration contexts:
@global- Applied to all platforms (desktop, servers, mobile)@droid- Only applied to Nix-on-Droid installations- Base name - Typically used for primary desktop configuration
Best Practices
Resource Management
Mobile devices have limited resources:Lightweight Configurations
Prefer CLI tools over GUI applications:Separate Concerns
Use the@droid suffix for mobile-specific configurations: