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

list-ephemeral — Ephemeral Path Discovery and Persistence Snippets

Purpose

list-ephemeral is a shell utility that helps discover ephemeral paths and generate Nix snippets for persistence. It integrates with Home-Manager to supply defaults, persisted paths, and program context.

Entry Point

Architecture / Services / Scope

Options

programs.list-ephemeral.enable

Typeboolean
DefaulthostPersistEnabled || config.user.persistence.enable
Exampletrue

Whether to enable list-ephemeral helper.


programs.list-ephemeral.extraExcludes

Typelist of string
Default[ ]
Example[ "home/*/.local/share/Trash" ]

Additional exclude patterns for list-ephemeral.


programs.list-ephemeral.extraIncludes

Typelist of string
Default[ ]
Example[ ".config/my-app" "/var/lib/my-app" ]

Additional paths to always include as candidates.


The module writes a generated config file consumed by the TUI:

  • Excludes default ephemeral paths (caches, logs, Electron app state, etc.) so they never appear as persistence candidates.
  • Supplies the currently persisted files and directories from user.persistence / host.persistence, which are marked as already persisted in the UI.
  • Supplies installed program names so the TUI can filter candidates by program context.

Usage

Default TUI (fzf-based with keybindings):

list-ephemeral

TUI Keybindings

KeyAction
/Enable search mode (type to fuzzy filter)
EscapeDisable search and clear query
Ctrl-POpen program filter (gum picker)
Ctrl-XClear program filter
SpaceToggle selection and move down
Ctrl-ASelect all
Ctrl-DDeselect all
Ctrl-CQuit (standard fzf behavior)
EnterConfirm selection

Note: In browse mode (default), typing text will appear in the prompt but won’t filter results. Press / to enable search filtering.

List mode:

list-ephemeral list

Trace mode (runs a command and then opens TUI with traced ephemeral paths):

list-ephemeral trace -- <cmd> [args...]

Snippet Generation

The TUI generates Nix snippets based on path location:

  • Paths under $HOME are emitted as user.persistence.files or user.persistence.directories with paths relative to $HOME.
  • Paths outside $HOME are emitted as host.persistence.files or host.persistence.directories with absolute paths.

If the selection includes both kinds, the snippet contains both blocks.