Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Settings

System

  • System flake: the folder that holds your flake.nix. Browse… opens a folder chooser.

  • Host: the configuration of this machine (nixosConfigurations.<host>). Choose it from the list or type its name.

  • Output file: where the app writes its generated entry file. Leave it empty for the default, drakeflake.nix next to flake.nix.

    • Choose file…: pick a .nix file.
    • Choose folder…: pick a folder. With a split layout the app writes default.nix there (so you import the folder); with a single file it writes drakeflake.nix there.
    • Use default: clear the field.

    The file must be inside the flake. Writes to: shows the file that will actually be written.

  • Use this system: switch to the flake, host and output file entered above. Staged changes are kept per system, so switching does not lose them.

  • Reload data: read options, values and packages again.

  • Rebuild caches: forget the cached option, value and package indexes and evaluate everything again.

  • Setup assistant…: open the setup assistant.

Generated files

File layout: decides how the settings are split over files:

  • Area and module (services/openssh.nix): one file per area and module. Options with a short name, such as networking.hostName, go into the area’s file (networking.nix).
  • By area (services.nix): one file per top-level area.
  • Single file: everything in the entry file.

With a split layout, the entry file only imports the other files, which live in a folder next to it: drakeflake/ for drakeflake.nix, or the same folder when the entry file is a folder’s default.nix. Packages go into packages.nix; Home Manager settings use the same layout inside home-manager/<user>/.

Custom rules: one rule per line, in the form prefix = file.nix. Settings whose option name starts with the prefix go into that file, in the folder next to the output file. Rules win over the layout, and when several rules match, the one with the longest prefix applies. Use environment.systemPackages as the prefix to move the package list. Lines starting with # are comments. For example:

services.openssh = remote-access.nix
environment.systemPackages = apps.nix

File names may use letters, digits, ., _, - and /; .nix is added when missing.

Click Save layout to use the new layout. It takes effect with the next save. If the change means the entry file is renamed (drakeflake.nix and default.nix in an output folder), the app removes the old generated entry file and its parts, and tells you to change your import.

Update notifications

Tray icon: turn on Start at login to start drakeflake-tray with your session. Start it now starts it right away. See Update notifications in the tray.

Code highlighting

Theme: the syntax highlighting theme for Nix code in previews, values and the Console. Automatic follows your desktop: under Plasma it picks the highlighting theme whose name matches your colour scheme or global theme (for example Catppuccin Mocha), otherwise Breeze Light or Breeze Dark by the brightness of your colours. Preview: shows the chosen theme.

Troubleshooting

  • Log detail: how much the app writes to its log file: Errors only, Warnings, Normal (recommended), Debug: every command run or Trace: also full command output. Debug messages from the interface itself are added after a restart.
  • Open log opens the log file; Show folder opens the folder that holds it.

See Troubleshooting for where the log is.

The configuration file

The settings are stored in ~/.config/drakeflake/config.toml (or under $XDG_CONFIG_HOME when it is set). The app writes it for you; you normally do not need to edit it. Missing keys take their defaults.

[general]
highlight_theme = ""       # empty: automatic
log_level = "info"         # error, warn, info, debug or trace

[nix]
flake_path = "/etc/nixos"  # the system flake
host = "laptop"            # the host; omit to choose it automatically
managed_path = "/etc/nixos/modules/"  # output file or folder; omit for the default

[layout]
mode = "area-module"       # single, area or area-module

[[layout.rules]]
prefix = "services.openssh"
file = "remote-access.nix"
KeyMeaning
general.highlight_themeName of the highlighting theme; empty for automatic.
general.log_levelDetail of the log file: error, warn, info (default), debug or trace. Also used by the tray.
nix.flake_pathThe system flake. Default /etc/nixos.
nix.hostThe host to manage.
nix.managed_pathThe output .nix file, or a folder (an existing one, or a path ending in /). Unset: drakeflake.nix next to flake.nix.
layout.modesingle, area or area-module (default).
layout.rulesCustom rules, each with prefix and file.

Environment variables

For testing and special setups, these variables override the saved settings when the app starts:

VariableEffect
DRAKEFLAKE_FLAKEUse this flake instead of the saved one.
DRAKEFLAKE_HOSTUse this host.
DRAKEFLAKE_MANAGED_FILEUse this output file or folder.
DRAKEFLAKE_SETUP=1Open the setup assistant on start.
DRAKEFLAKE_SOFTWARE_RENDERING=1Draw the window with the software renderer.
DRAKEFLAKE_EVAL_JOBSHow many evaluations run at once (normally chosen by CPU count and free memory).