You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(module): allow sqlite db writes to ~/.local/share/revue - #2
When services.revue.user is configured and ProtectHome = 'read-only', SQLite writes to the default database location at ~/.local/share/revue/revue.db fail with attempt to write a readonly database. Add /home/${cfg.user}/.local/share/revue to ReadWritePaths.
Summary by CodeRabbit
Bug Fixes
The service can now write to the user’s local Revue storage directory as well as its Gemini storage directory.
Revue data is stored in the local directory configured for the service, alongside the existing Gemini data. The directory is created with user-specific ownership and permissions when a service user is configured.
When user is set and ProtectHome is 'read-only', SQLite writes to the
default database at ~/.local/share/revue fail with attempt to write a
readonly database. Add ~/.local/share/revue to ReadWritePaths.
When cfg.user is set, the module creates /home/${cfg.user}/.local/share/revue and configures the service to write to it. The service sets REVUE_DATA_DIR to that directory.
Changes: Configured-user service
Layer / File(s)
Summary
Configure Revue data access nix/module.nix
The module creates the Revue data directory with mode 0750 and ownership based on cfg.user and cfg.group. The service adds the directory to ReadWritePaths and sets REVUE_DATA_DIR to its path.
No confirmed actionable risk remains in the current change.
Security architecture risk: Low · up to 8f052
The added write access is narrowly scoped, and existing sandbox controls remain enabled. No introduced vulnerability was established, but activation ordering, effective database permissions, and upgrades from another database location remain deployment-dependent.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
inferred — The declared authority increase is a writable Revue directory for the configured service identity on the host. It does not grant a new identity or intentionally make the entire home writable; effective filesystem exposure still depends on deployed path resolution and permissions.
Trust Boundaries and Controls
observed — ProtectSystem=strict, ProtectHome=read-only, NoNewPrivileges, and PrivateTmp remain enabled for the configured-user service. Directory ownership matches its User and Group. Database availability does not determine webhook-secret resolution in the inspected startup flow.
Resilience and Maintainability Implications
observed — The module declares directory creation separately from service startup and explicitly orders the service only after network.target. This does not establish a missing effective dependency: generated NixOS ordering and activation evidence were unavailable, so first-activation and upgrade readiness remain unverified.
Hardening Proposals
proposed — Where stored review data must be private to the service account, consider an owner-only directory and restrictive service umask, or a dedicated group with verified membership. This is a hardening option, not a verified disclosure finding.
Pre-merge checks: 5
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly identifies the main change: allowing SQLite database writes to ~/.local/share/revue through the module update.
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
The reason will be displayed to describe this comment to others. Learn more.
Additional comments: 1
nix/module.nix-58-60: 1
58-60: Minor · Functional Correctness · Quick win
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Preserve ownership of the parent directories.
If /home/${cfg.user}/.local/share does not exist, this leaf-only rule causes systemd-tmpfiles to create the parent directories as root:root with mode 0755. Only revue receives ${cfg.user} ownership. (freedesktop.org)
The service user can write the Revue directory but cannot create other entries under .local/share. Add explicit parent rules with the configured owner and group, while leaving existing modes unchanged.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Central YAML; Path: .coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID: 8996fffd-f1bf-45b1-a6dd-c0f1e08d741a
Commits
Reviewing files that changed from the base of the PR and between a65e3ab and 8f05297.
Files selected for processing: 1
nix/module.nix
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
…rmissions
Upstream kleinbem-dev/revue#2 provides the systemd tmpfiles rule and
ReadWritePaths for ~/.local/share/revue directly. Bump the flake input to
include this fix.
kleinbem
added a commit
to kleinbem/nix-config
that referenced
this pull request
Nov 4, 2026
…525)
When `services.revue.user` is set to `martin` and `ProtectHome =
'read-only'`, revue cannot write to its default database at
`~/.local/share/revue/revue.db`, failing with `attempt to write a
readonly database`.
Grants write access to `/home/martin/.local/share/revue` pending
upstream module fix: kleinbem-dev/revue#2
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **Bug Fixes**
* Fixed the Revue daemon’s access to its data directory, allowing it to
write its files successfully.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
services.revue.useris configured andProtectHome = 'read-only', SQLite writes to the default database location at~/.local/share/revue/revue.dbfail withattempt to write a readonly database. Add/home/${cfg.user}/.local/share/revuetoReadWritePaths.Summary by CodeRabbit