Skip to content

Optimize Nix Logging and Suppress Compiler Noise #114

@szmyty

Description

@szmyty

🧹 Optimize Nix Logging and Suppress Compiler Noise

Summary

Nix is currently generating extremely verbose logs during builds (including thousands of GCC/Python/libmpdec warnings). This makes devcontainer builds noisy, slow, and difficult to debug. Nix provides configuration options to suppress these logs safely without hiding meaningful errors.

Tasks

  • Create ${UBI_USER}’s Nix config directory:
    $HOME/.config/nix/nix.conf
  • Add the following minimal recommended options:
    log-lines = 0 build-verbosity = 0
  • Update the Dockerfile to append these settings after installing Nix:
    RUN mkdir -p $HOME/.config/nix && \ printf "log-lines = 0\nbuild-verbosity = 0\n" \ >> $HOME/.config/nix/nix.conf

Optional Enhancements

  • Add Determinate Systems binary cache to prevent source builds (faster builds)
  • Add GitHub-dependent binary caches for CI optimization
  • Add a section to the UBI documentation explaining the Nix logging defaults

Acceptance Criteria

  • Nix builds in the devcontainer show minimal output (errors only)
  • No more GCC spam during Python or dependency builds
  • Devcontainer logs become readable and significantly shorter
  • Nix still surfaces real errors when they occur

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions