Nix module fixes: storage formatting, DynamicUser, logging#221
Open
ananthb wants to merge 6 commits intoOverclock-Validator:devfrom
Open
Nix module fixes: storage formatting, DynamicUser, logging#221ananthb wants to merge 6 commits intoOverclock-Validator:devfrom
ananthb wants to merge 6 commits intoOverclock-Validator:devfrom
Conversation
7ff33d6 to
e726360
Compare
e726360 to
4705800
Compare
4705800 to
ff26fb4
Compare
Rewrite format scripts with proper blkid error handling instead of swallowing all errors with || true. Add device unit dependencies so format services wait for devices. Refactor duplicate format logic into a shared mkFormatScript function. Add dataDir option to decouple external storage paths from systemd StateDirectory.
Switch to DynamicUser=true and chown external mount points so the dynamic user can write to root-owned filesystems after mkfs. Run ExecStartPre scripts with elevated privileges (+) and resolve config paths to mount points directly instead of StateDirectory placeholders.
Replace logToStdout boolean with logTarget enum (file/journald/both) for explicit control over log destinations. Only create LogsDirectory and configure file-based log settings when file logging is enabled. Make LOGS_DIRECTORY optional in config init script.
When force=true, the format script was wiping and reformatting the disk on every boot, even when the filesystem already matched the requested type. Now it only force-formats when the existing filesystem differs.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove unused fileLoggingEnabled binding in shared/lib.nix and apply statix inherit-from suggestions in storage.nix. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e3761f2 to
b7b6bd8
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
|| true. Add device unit dependencies so format services wait for devices. Refactor duplicate format logic into a sharedmkFormatScript. AdddataDiroption to decouple external storage from systemd StateDirectory.DynamicUser=trueand chown external mount points so the dynamic user can write to root-owned filesystems after mkfs. Run ExecStartPre scripts with elevated privileges (+). Resolve config paths to mount points directly.logToStdoutboolean withlogTargetenum (file/journald/both). Only create LogsDirectory when file logging is enabled. MakeLOGS_DIRECTORYoptional in config init script.force=true, skip reformatting if the existing filesystem already matches the requested type. Previously it wiped and reformatted on every boot.Supersedes #220.