Complete reference for all Mars modules and configuration options
← Back to Creating Hosts | Back to Main README
All custom options are under the config.mars namespace to avoid conflicts with native NixOS configurations. This reference documents all available Mars modules.
This documentation is a work in progress. New Mars modules and options are being added regularly. Check back for updates or contribute by opening an issue or pull request.
- Boot Options
- Security Options
- Hardware Options
- Graphics Options
- Shell Options
- Desktop Options
- Development Options
- Gaming Options
Control boot-related configurations including secure boot, boot splash, and kernel selection.
| Option | Type | Default | Description |
|---|---|---|---|
secureBoot |
boolean | false |
Enable Secure Boot using Lanzaboote |
plymouth |
boolean | false |
Enable Plymouth boot splash screen |
kernel.version |
string | "stable" |
Kernel version ("stable", "latest", "rc") |
Example:
mars.boot = {
secureBoot = true;
plymouth = true;
kernel.version = "latest";
};Configure system security tools and sudo replacements.
| Option | Type | Default | Description |
|---|---|---|---|
doas |
boolean | false |
Enable doas as sudo replacement |
sudo-rs |
boolean | false |
Enable Sudo-RS as traditional sudo replacement |
Example:
mars.security.doas = true;Note: Only enable one of
doasorsudo-rs, not both.
ASUS laptop-specific configurations and optimizations.
| Option | Type | Default | Description |
|---|---|---|---|
enable |
boolean | false |
Enable ASUS-specific configurations |
battery.chargeUpto |
integer | 100 |
Battery charge limit percentage (20-100) |
battery.enableChargeUptoScript |
boolean | true |
Script to temporarily set the charge limit |
Example:
mars.hardware.asus = {
enable = true;
battery.chargeUpto = 80;
};Tip: Setting charge limit to 80% can significantly extend battery lifespan.
CPU vendor-specific optimizations.
| Option | Type | Default | Description |
|---|---|---|---|
amd.enable |
boolean | false |
Enable AMD CPU optimizations |
intel.enable |
boolean | false |
Enable Intel CPU optimizations |
Example:
mars.hardware.cpu.amd.enable = true;Note: Only enable the option matching your CPU vendor.
Power management and laptop-specific tweaks.
| Option | Type | Default | Description |
|---|---|---|---|
laptopOptimizations |
boolean | false |
Enable power management and laptop-specific tweaks |
Example:
mars.hardware.laptopOptimizations = true;Includes: TLP, auto-cpufreq, powertop optimizations, and laptop-mode-tools.
Configure graphics drivers and GPU-specific settings.
| Option | Type | Default | Description |
|---|---|---|---|
enable |
boolean | false |
Enable graphics drivers |
AMD/RADEON graphics driver configuration.
| Option | Type | Default | Description |
|---|---|---|---|
enable |
boolean | false |
Enable AMD graphics drivers |
compute.enable |
boolean | false |
Enable compute/AI optimizations |
compute.rocm |
boolean | false |
Enable ROCm platform support |
compute.openCL |
boolean | false |
Enable OpenCL support |
compute.hip |
boolean | false |
Enable HIP runtime support |
Example:
mars.hardware.graphics = {
enable = true;
amd = {
enable = true;
compute.enable = false; # Enable for machine learning/compute
};
};Open-source NVIDIA driver (Nouveau).
| Option | Type | Default | Description |
|---|---|---|---|
enable |
boolean | false |
Enable open-source NVIDIA drivers |
Example:
mars.hardware.graphics = {
enable = true;
nvidiaFree.enable = true;
};Note: Performance is generally lower than proprietary drivers.
Proprietary NVIDIA driver configuration.
| Option | Type | Default | Description |
|---|---|---|---|
enable |
boolean | false |
Enable proprietary NVIDIA drivers |
nvenc |
boolean | false |
Enable NVENC hardware encoding |
driver |
string | "stable" |
Driver version ("stable", "latest", "beta", "production", "legacy_470", "legacy_390") |
wayland-fixes |
boolean | false |
Apply Wayland compatibility fixes |
Example:
mars.hardware.graphics = {
enable = true;
nvidiaPro = {
enable = true;
nvenc = true;
driver = "beta";
wayland-fixes = true;
};
};NVIDIA Prime configuration for hybrid graphics (laptops with iGPU + dGPU).
| Option | Type | Default | Description |
|---|---|---|---|
enable |
boolean | false |
Enable NVIDIA Prime for hybrid graphics |
igpu.vendor |
string | null |
Integrated GPU vendor ("amd" or "intel") |
igpu.port |
string | null |
Integrated GPU PCI port (e.g., "PCI:35:0:0") |
dgpu.port |
string | null |
Discrete GPU PCI port (e.g., "PCI:1:0:0") |
Example:
mars.hardware.graphics = {
enable = true;
amd = {
enable = true;
};
nvidiaPro = {
enable = true;
nvenc = true;
driver = "beta";
prime = {
enable = true;
igpu = {
vendor = "amd";
port = "PCI:35:0:0";
};
dgpu.port = "PCI:1:0:0";
};
wayland-fixes = true;
};
};Finding PCI Ports: Use
lspci | grep -E "VGA|3D"to identify your GPU PCI addresses.
Example Output:
01:00.0 VGA compatible controller: NVIDIA Corporation ...
35:00.0 VGA compatible controller: Advanced Micro Devices ...
Convert 01:00.0 to PCI:1:0:0 and 35:00.0 to PCI:35:0:0.
Desktop environment and productivity tools.
| Option | Type | Default | Description |
|---|---|---|---|
graphics |
boolean | false |
Include graphics/creation tools (OBS, GIMP, Inkscape, etc.) |
Example:
mars.desktop.graphics = true;Shell configuration options.
| Option | Type | Default | Description |
|---|---|---|---|
bash |
boolean | true |
Enable Bash as the default shell |
fish |
boolean | false |
Enable Fish shell (overrides bash if enabled) |
Example:
mars.shell.fish = true;Development tools and programming language environments.
| Option | Type | Default | Description |
|---|---|---|---|
enable |
boolean | false |
Enable Git with configuration |
username |
string | null |
Git username |
email |
string | null |
Git email |
| Option | Type | Default | Description |
|---|---|---|---|
nix |
boolean | false |
Enable Nix development tools (nixfmt, nil, etc.) |
python |
boolean | false |
Enable Python development environment |
octave |
boolean | false |
Enable GNU Octave (MATLAB alternative) |
rust |
boolean | false |
Enable Rust toolchain (rustc, cargo, etc.) |
javascript |
boolean | false |
Enable Node.js and npm |
Example:
mars.dev = {
git = {
enable = true;
username = "YourUsername";
email = "your.email@example.com";
};
languages = {
nix = true;
python = true;
rust = true;
};
};Gaming-related packages and optimizations with automatic performance tuning.
| Option | Type | Default | Description |
|---|---|---|---|
enable |
boolean | false |
Enable gaming packages and optimizations |
extra-gaming-packages |
boolean | false |
Include additional gaming tools and emulators |
When mars.gaming.enable = true, the following optimizations are automatically applied:
Environment Variables:
DXVK_STATE_CACHE = "1"- Enables shader caching for Proton/Wine gamesDXVK_STATE_CACHE_PATH = "$HOME/.cache/dxvk"- Shader cache locationDXVK_HUD = "compiler"- Shows shader compilation info__GL_THREADED_OPTIMIZATIONS = "1"- Multi-threaded OpenGL rendering__GL_SHADER_DISK_CACHE = "1"- OpenGL shader disk cacheRADV_PERFTEST = "gpl,nggc,sam"- AMD experimental features (when AMD GPU enabled)
Included Packages:
- MangoHUD - Performance overlay (FPS, temps, GPU/CPU usage)
- GOverlay - GUI for MangoHUD configuration
- libstrangle - Frame rate limiter
- lm_sensors - Hardware monitoring
- vkBasalt - Vulkan post-processing (sharpening, CAS, color correction)
Kernel Optimizations (when gaming enabled):
tsc=reliable- Faster timekeepingclocksource=tsc- Use TSC for timingpreempt=full- Full preemption for lower latency- Additional sysctl tuning from CachyOS
Feral GameMode for performance optimization during gaming.
| Option | Type | Default | Description |
|---|---|---|---|
enable |
boolean | false |
Enable Feral GameMode |
amdOptimizations |
boolean | false |
Enable AMD-specific optimizations |
nvidiaOptimizations |
boolean | false |
Enable NVIDIA-specific optimizations |
What GameMode Does:
- Sets CPU governor to
performancefor maximum clock speeds - Increases I/O priority to 0 (highest) for game processes
- Manages integrated GPU power balance intelligently
- Applies GPU-specific optimizations (AMD/NVIDIA)
- Optional ASUS laptop profile switching (Performance mode)
Example:
mars.gaming.gamemode = {
enable = true;
nvidiaOptimizations = true; # or amdOptimizations
};Note: GameMode also includes automatic renice (priority 10), screensaver inhibit, and split-lock mitigation disable.
Micro-compositor for gaming with built-in frame limiting and scaling.
| Option | Type | Default | Description |
|---|---|---|---|
enable |
boolean | false |
Enable Gamescope compositor |
Features:
- MangoHUD integration via
--mangoapp - Vulkan rendering preferred over OpenGL
- Realtime scheduling for reduced input latency
- Wayland client support
- Optional adaptive sync (VRR/FreeSync)
Usage:
# Launch a game through Gamescope
gamescope -W 1920 -H 1080 -r 144 -- game_executable
# In Steam, add to launch options:
gamescope -f -- %command%Example:
mars.gaming.gamescope.enable = true;Minecraft launcher and Java configurations.
| Option | Type | Default | Description |
|---|---|---|---|
prismlauncher.enable |
boolean | false |
Enable Prism Launcher |
extraJavaPackages.enable |
boolean | false |
Include additional Java versions (8, 17, 21) |
Valve Steam gaming platform.
| Option | Type | Default | Description |
|---|---|---|---|
enable |
boolean | false |
Enable Steam |
openFirewall |
boolean | false |
Open Steam ports in firewall |
hardware-rules |
boolean | false |
Enable hardware-specific udev rules (controllers, VR) |
Complete Gaming Example:
mars.gaming = {
enable = true;
extra-gaming-packages = true;
gamemode = {
enable = true;
nvidiaOptimizations = true;
};
gamescope.enable = true;
steam = {
enable = true;
openFirewall = true;
hardware-rules = true;
};
minecraft = {
prismlauncher.enable = true;
extraJavaPackages.enable = true;
};
};Here's a complete example combining multiple Mars modules:
{
imports = [
./disko.nix
../../modules/system/default.nix
];
networking.hostName = "mars-workstation";
mars = {
# Boot
boot = {
secureBoot = true;
plymouth = true;
kernel.version = "latest";
};
# Security
security.doas = true;
# Hardware
hardware = {
rootSSD = true;
cpu.amd.enable = true;
graphics = {
enable = true;
amd = {
enable = true;
};
nvidiaPro = {
enable = true;
nvenc = true;
driver = "stable";
prime = {
enable = true;
igpu = {
vendor = "amd";
port = "PCI:35:0:0";
};
dgpu.port = "PCI:1:0:0";
};
wayland-fixes = true;
};
};
};
# Shell
shell.fish = true;
# Desktop
desktop.graphics = true;
# Development
dev = {
git = {
enable = true;
username = "developer";
email = "dev@example.com";
};
languages = {
nix = true;
python = true;
};
};
# Gaming
gaming = {
enable = true;
gamemode = {
enable = true;
nvidiaOptimizations = true;
};
gamescope.enable = true;
steam = {
enable = true;
hardware-rules = true;
};
};
};
system.stateVersion = "25.11";
}