Skip to content

Improve systems support and add configuration deduplication

Horizon Bot requested to merge add-flakes-list-to-validators into master

Summary

This MR includes two major improvements:

  1. Use nixpkgs.lib.systems.flakeExposed (v0.11.1)
  2. Add configuration deduplication (v0.12.0)

0.11.1: Systems Support

Changes the systems configuration to use nixpkgs.lib.systems.flakeExposed instead of a manually maintained list.

  • Supports all 10 systems from nixpkgs flakeExposed
  • Systems: x86_64-linux, aarch64-linux, x86_64-darwin, aarch64-darwin, armv6l-linux, armv7l-linux, i686-linux, powerpc64le-linux, riscv64-linux, x86_64-freebsd
  • Allows the gitlab-ci flake module to be imported on any of these architectures

0.12.0: Configuration Deduplication

Introduces several improvements to reduce configuration duplication across CI modules:

New systems module:

  • Adds gitlab-ci.systems module that provides a shared systems option
  • omnix and cachix modules now default to config.systems if available
  • Falls back to current system if systems module not imported

Auto-enable flake validation:

  • omnix and cachix now enable flake validation by default
  • Only applies if flake module is also imported by the user
  • Can be disabled with flake.enable = false

Smart flakes defaults:

  • omnix.flakes and cachix.flakes default to flake.flakes if available
  • Falls back to [ "." ] if flake module not enabled
  • Eliminates duplication when same paths used across modules

Example

Before:

gitlab.ci = {
  imports = [
    inputs.gitlab-ci.modules.gitlab-ci.omnix
    inputs.gitlab-ci.modules.gitlab-ci.flake
  ];
  
  omnix = {
    enable = true;
    systems = [ "x86_64-linux" ];
    flakes = [ "." "./test" ];
  };
  
  flake = {
    enable = true;
    flakes = [ "." "./test" ];
  };
};

After:

gitlab.ci = {
  imports = [
    inputs.gitlab-ci.modules.gitlab-ci.systems
    inputs.gitlab-ci.modules.gitlab-ci.omnix
    inputs.gitlab-ci.modules.gitlab-ci.flake
  ];
  
  systems = [ "x86_64-linux" ];
  flake.flakes = [ "." "./test" ];
  omnix.enable = true;
  # flake.enable defaults to true via omnix
};

Testing

  • Verified that nix flake show succeeds
  • Checked all systems are exposed correctly

🤖 Generated with Claude Code

Edited by Horizon Bot

Merge request reports