Skip to main content

rosec — Configuration Reference

Config file: $XDG_CONFIG_HOME/rosec/config.toml (default: ~/.config/rosec/config.toml)

Include user configuration fragments​

The main config can explicitly include other TOML files:

# ~/.config/rosec/config.toml (include must be at the top level)
include = ["packaged-trust.toml", "personal-settings.toml"]

No system configuration or fragment directory is loaded automatically. The CLI and daemon use the same loader, including when you select a file with --config. Absolute paths are accepted. Relative paths are resolved against the directory of the file containing the include, not the process's working directory. For a symlinked config, this is the directory of the symlink. Symlinks into the Nix store are supported. Paths are literal: no glob, environment or ~ expansion.

Includes are processed in list order, then the containing file is applied last. Nested tables merge, and later scalar values and arrays replace earlier ones. There is one exception: nonempty service.wasm_trusted_key lists append, so independent signing keys can coexist. Set wasm_trusted_key = [] explicitly to clear all additional keys inherited so far. Embedded release keys are unaffected. Key names are labels, not identifiers for replacing entries; restricting an inherited key requires clearing the list and specifying the desired keys again.

Missing includes, invalid TOML or configuration values, and include cycles are errors. Includes are limited to 16 levels, 128 file reads, and 1 MiB per file. A missing main config still uses defaults. Each fragment must be valid on its own; split settings across tables, not partial provider or trusted-key entries.

rosec config show prints the main file. Use rosec config show --show-defaults to inspect the merged config with defaults, or rosec config get for a supported individual setting. Config editing commands write only the main file and preserve its include list. Edit packaged fragments through their owner, such as Home Manager. Keep provider entries in the main file when managing them through the CLI: a main-file [[provider]] array replaces an included provider array.

The daemon watches included files as well as the main file. Invalid edits keep the running configuration intact. Restart rosecd after changing trusted keys, wasm_verify, or wasm_prefer. Those changes are not applied to already loaded plugins; the daemon keeps its running configuration until restarted.

Home Manager and packaged signing keys​

Home Manager can own a public-key fragment while the main config stays writable:

xdg.configFile."rosec/packaged-trust.toml".text = ''
[[service.wasm_trusted_key]]
name = "my-provider-builds"
key = "RWQ..." # Replace with the signing public key's second line.
kinds = ["bitwarden-pm"]
'';

Add include = ["packaged-trust.toml"] to the user's main config once. Home Manager links its generated file into the user's config directory; enabling that configuration is the user's decision to trust the signer. Merely installing a package does not add a trust anchor. A module can instead generate the entire main config, but CLI edits to an immutable generated file are not supported.

Only public keys belong in these generated files. Keep private signing keys and credentials out of Nix expressions and store outputs. The package builder still needs to sign its rebuilt WASM together with the policy sidecar and install the complete bundle. Includes do not sign providers or change provider search paths. See Packaging, signing, and distribution.

Editing from the CLI​

Read or change individual settings without opening the file — the daemon hot-reloads on set:

rosec config show --show-defaults # print the merged config
rosec config get autolock.idle_timeout_minutes # read one dotted key
rosec config set service.refresh_interval_secs 120

The reference below documents every key.


[service]​

Controls vault caching and deduplication behaviour.

KeyTypeDefaultDescription
dedup_strategystring"newest"How to resolve duplicate items across providers. See Deduplication.
dedup_time_fallbackstring"created"Timestamp field used when dedup_strategy = "newest". "created" or "none".
refresh_interval_secsinteger60How often (seconds) to re-sync each provider. Set to 0 to disable periodic refresh.
ssh_fusebooltrueMount the SSH FUSE filesystem at $XDG_RUNTIME_DIR/rosec/ssh/. Set to false to disable. See ssh-agent.md.
totp_fusebooltrueMount the TOTP FUSE filesystem at $XDG_RUNTIME_DIR/rosec/totp/. Set to false to disable.
fido2boolfalseServe stored passkeys to browsers as a virtual security key. Requires the rosec-uhid broker; off by default. See FIDO2 passkeys.
wasm_preferstring"user"Which copy wins when a WASM provider kind exists in both the system and user provider directories: "user", "system", or "newest".
wasm_verifystring"required"Provider authenticity verification: "required" (signature or embedded package hashes) or "disabled" (local plugin development only).
wasm_trusted_keyarray of tables[]Additional trust anchors for WASM plugin signatures. See Trusted plugin signing keys.

Inventory metadata refreshes when confirmed changes are published. A separate 60-second reconciliation discovers missed notifications and changes from providers without notifications. This reconciliation reads provider state; it does not itself request a remote vault sync. Remote sync scheduling continues to use refresh_interval_secs. Successful unlocks and syncs also refresh the inventory.

Trusted plugin signing keys​

By default a WASM plugin only loads when its bundle is signed by a rosec release key embedded in the binary. To run a plugin signed by a third party (e.g. a partner shipping their own provider) without the global off-switch of wasm_verify = "disabled", add the author's minisign public key as a trust anchor:

[[service.wasm_trusted_key]]
key = "RWQ..." # base64 minisign public key (second line of the .pub file)
name = "acme-corp" # label shown in logs and `rosec provider validate`
kinds = ["acme-vault"] # optional: kinds this key may vouch for (empty = any)

Scoping kinds limits the blast radius of the extended trust: the key is only consulted for plugins whose signed policy declares one of the listed kinds. rosecd logs a warn! at startup whenever a plugin loads on the strength of a user-trusted key rather than a release key, and rosec provider validate <kind> shows the same provenance.

Deduplication​

When multiple providers return an item with the same label or attributes, rosec picks one winner according to dedup_strategy:

ValueBehaviour
"newest"Keep the item with the most recent modification time. Falls back to dedup_time_fallback if modification time is unavailable.
"priority"Keep the item from the provider listed first in config.toml.
"none"Expose all copies; clients see duplicates.

[autolock]​

Controls when the daemon locks providers automatically. These are global defaults — individual providers can override any field via [provider.autolock] (see below).

The defaults mirror KWallet/GNOME Keyring behaviour: providers stay unlocked for the session duration and lock only on logout.

KeyTypeDefaultDescription
on_logoutbooltrueLock when the user session ends (logind SessionRemoved).
on_session_lockboolfalseLock when the screen is locked (logind Lock signal).
idle_timeout_minutesinteger or omitted(none)Lock after this many minutes of D-Bus inactivity. Omit or set to 0 to disable.
max_unlocked_minutesinteger or omitted(none)Hard upper limit on how long a provider stays unlocked. Omit or set to 0 to disable.

Note: PrepareForSleep (suspend/hibernate) always locks all providers regardless of config — this is not configurable.


[prompt]​

Controls the unlock prompt shown when a secret is requested and the vault is locked.

KeyTypeDefaultDescription
backendstring"builtin""builtin" uses the bundled rosec-prompt GUI. Any other value is treated as a path to an external prompter binary.
argsarray of strings[]Arguments passed to an external prompter. Supports template placeholders.

External prompter​

When backend is a binary path, rosec spawns it as a subprocess, passes the prompt request via stdin as JSON, and reads the response from stdout.

Template placeholders in args:

PlaceholderValue
{{title}}Prompt window title
{{message}}Human-readable description
{{hint}}Short context hint (e.g. provider name)
{{backend}}Provider ID (template variable name kept for back-compat with custom prompters)

Example:

[prompt]
backend = "/usr/bin/my-prompter"
args = [
"--title={{title}}",
"--message={{message}}",
"--hint=Backend: {{backend}}",
]

[prompt.theme]​

Theming for the built-in rosec-prompt GUI. All color values accept #RRGGBBAA or #RRGGBB hex format (alpha defaults to ff if omitted).

FieldShort alias(es)DefaultDescription
backgroundbg#1e1e2effWindow background
foregroundfg#cdd6f4ffPrimary text
label_colorlc#a6adc8ffSecondary / hint text
accent_colorac#7aa2f7ffAccent color (focus rings, highlights)
input_backgroundibg#181825ffPassword field background
input_textit#cdd6f4ffPassword field text
border_colorbd, bdr#89b4faffWindow border
border_widthbw2Border width in pixels
font_familyfont"monospace"Font family name
font_sizesize14Font size in pixels
window_radiuswr8Window corner radius in logical pixels, clamped to 0–64
control_radiuscr6Input, button, and control corner radius in logical pixels, clamped to 0–64
confirm_backgroundybg(accent)Unlock button background (empty = use accent)
confirm_textyt(foreground)Unlock button text (empty = use foreground)
cancel_backgroundnbg(accent)Cancel button background (empty = use accent)
cancel_textnt(foreground)Cancel button text (empty = use foreground)

Example (Catppuccin Mocha palette):

[prompt.theme]
bg = "#1e1e2ecc"
fg = "#cdd6f4ff"
lc = "#a6adc8ff"
ac = "#7aa2f7ff"
ibg = "#181825ff"
it = "#cdd6f4ff"
bd = "#89b4faff"
bw = 2
font = "monospace"
size = 14
window_radius = 8
control_radius = 6

[[provider]]​

Each [[provider]] section registers one secrets source. Multiple providers can be listed; items are deduplicated across them (see Deduplication).

KeyTypeRequiredDescription
idstringyesUnique identifier for this provider. Used in D-Bus paths and CLI commands.
kindstringyesProvider type. Currently: "local", "bitwarden", "bitwarden-sm", "gnome-keyring", "keepassxc-file".
pathstringsometimesPath to the on-disk file backing this provider. Required for local (vault file) and keepassxc-file (kdbx file). ~/ is expanded to $HOME.
collectionstringnoStamp a collection attribute onto every item from this provider. Useful for grouping in multi-provider setups.
return_attrarray of stringsnoOrdered list of glob patterns selecting which sensitive attribute to return via GetSecret. First match wins. Default: ["password", "number", "private_key", "notes"].
match_attrarray of stringsnoGlob patterns controlling which attributes participate in SearchItems filtering. Reserved for future use.
tls_modestringnoTLS certificate verification for plugin HTTP requests. "bundled" (default): Mozilla root certs only. "system": use the OS trust store (for self-signed / private CA certs).
tls_mode_probestringnoTLS certificate verification for readiness probes. Inherits from tls_mode if not set. "disabled": skip TLS verification. "system": OS trust store. "bundled": Mozilla root certs.
offline_cacheboolnoEnable encrypted offline cache export/restore for providers that declare the OfflineCache capability. Default: true.
wasm_memory_limit_mibintegernoWASM linear-memory budget for this provider instance in whole MiB. Overrides the packaged policy. The fallback is 256 MiB. Set this under [[provider]].
unlock_timeout_secsintegernoMaximum seconds to wait for this provider's unlock (readiness probes + authentication) during the parallel multi-provider unlock flow. If exceeded, the attempt is cancelled without blocking other providers. Default: 30.

[provider.cache] — Offline vault freshness​

max_age_days sets how long this provider may restore a vault snapshot offline. It defaults to 10 whole days. Set it to 0 to disable the local age check. Age starts at the last successful online unlock or sync that confirmed the snapshot, even when the contents stayed the same. Existing snapshots use their authenticated write time. Failed syncs and offline reads leave that time intact.

[[provider]]
id = "work"
kind = "bitwarden-pm"

[provider.cache]
max_age_days = 3

offline_cache = false on the provider disables vault cache export and restore for every age setting. Refresh tokens and remembered two-factor authentication have independent expiration policies.

[provider.autolock] — Per-provider autolock overrides​

Each provider can have its own [provider.autolock] sub-table. Fields not specified inherit from the global [autolock] section. This lets you, for example, keep a work provider locked more aggressively while leaving your personal provider unlocked for the session.

KeyTypeDefaultDescription
on_logoutbool(inherit)Override the global on_logout for this provider.
on_session_lockbool(inherit)Override the global on_session_lock for this provider.
idle_timeout_minutesinteger(inherit)Override the global idle timeout. 0 explicitly disables.
max_unlocked_minutesinteger(inherit)Override the global max-unlocked timeout. 0 explicitly disables.

Example:

[[provider]]
id = "work"
kind = "bitwarden"

[provider.options]
email = "work@example.com"

[provider.autolock]
idle_timeout_minutes = 5
on_session_lock = true

[provider.options] — Local vault (kind = "local")​

KeyRequiredDescription
pathnoVault file path. Defaults to ~/.local/share/rosec/providers/<id>.vault. May also be set as the top-level path field on [[provider]].

See providers/local.md.

[provider.options] — Bitwarden Personal Vault (kind = "bitwarden")​

KeyRequiredDescription
emailyesBitwarden account email address.
base_urlnoServer URL. Omit for official US cloud (https://vault.bitwarden.com). Set to your Vaultwarden instance for self-hosted.

[provider.options] — Bitwarden Secrets Manager (kind = "bitwarden-sm")​

Available when the bitwarden-sm feature is compiled in.

KeyRequiredDescription
access_tokenyesMachine account access token from the SM web vault.
organization_idyesOrganization UUID.
server_urlnoSM API base URL. Omit for official cloud.

[provider.options] — Proton Pass (kind = "protonpass") — experimental​

Read-only access to Proton Pass through its API. No provider-specific options are required. Register a personal access token and local unlock passphrase through rosec provider auth <id>; credentials do not belong in TOML. See Proton Pass for token setup and supported items.

[provider.options] — GNOME Keyring (kind = "gnome-keyring")​

Read-only access to existing ~/.local/share/keyrings/*.keyring files. No required options; the plugin scans the standard keyring directory at unlock time.

[provider.options] — KeePassXC file (kind = "keepassxc-file") — experimental​

Reads a KeePassXC .kdbx (KDBX 4) directly from disk. Read-only. See providers/keepassxc-file.md for a full setup guide including TOTP and SSH key conventions.

KeyRequiredDescription
pathyesAbsolute or ~/-prefixed path to the .kdbx database.
key_filenoPath to a key file used as a second factor. When set, master password becomes optional (KeePassXC permits key-file-only authentication).

Legacy [[vault]] and [[backend]] sections​

Earlier rosec releases used [[vault]] for local encrypted vaults and [[backend]] for remote sources. These names are no longer recognised — the only section the daemon parses is [[provider]]. If you have an old configuration, replace [[backend]] with [[provider]], [[vault]] with [[provider]] kind = "local", and rename type = to kind = .


Full example​

[service]
dedup_strategy = "newest"
dedup_time_fallback = "created"
refresh_interval_secs = 60
ssh_fuse = true
totp_fuse = true
fido2 = false


# Global defaults — providers stay unlocked for the session, lock on logout.
[autolock]
on_logout = true
on_session_lock = false
# idle_timeout_minutes = 15 # uncomment to enable
# max_unlocked_minutes = 240 # uncomment to enable

[prompt]
backend = "builtin"

[prompt.theme]
bg = "#1e1e2ecc"
fg = "#cdd6f4ff"
lc = "#a6adc8ff"
ac = "#7aa2f7ff"
ibg = "#181825ff"
it = "#cdd6f4ff"
bd = "#89b4faff"
bw = 2
font = "monospace"
size = 14
window_radius = 8
control_radius = 6

# Local encrypted vault — fully writable, offline-only.
[[provider]]
id = "local"
kind = "local"
path = "~/.local/share/rosec/vaults/local.vault"

# Personal Bitwarden vault — uses global autolock defaults.
[[provider]]
id = "personal"
kind = "bitwarden"

[provider.options]
email = "user@example.com"
# base_url = "https://your-vaultwarden.example.com"

# Work Secrets Manager org (bitwarden-sm feature required).
# Stricter autolock: 5-minute idle, lock on screen lock.
[[provider]]
id = "work-sm"
kind = "bitwarden-sm"
collection = "work"

[provider.options]
access_token = "0.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.secret:key"
organization_id = "00000000-0000-0000-0000-000000000000"

[provider.autolock]
idle_timeout_minutes = 5
on_session_lock = true

# KeePassXC kdbx (read-only, experimental).
[[provider]]
id = "kp-personal"
kind = "keepassxc-file"
path = "~/Passwords.kdbx"

[provider.options]
# key_file = "~/Passwords.keyx"