Improve systems support and add configuration deduplication
Summary
This MR includes two major improvements:
- Use nixpkgs.lib.systems.flakeExposed (v0.11.1)
- 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.systemsmodule that provides a sharedsystemsoption -
omnixandcachixmodules now default toconfig.systemsif available - Falls back to current system if systems module not imported
Auto-enable flake validation:
-
omnixandcachixnow enableflakevalidation by default - Only applies if
flakemodule is also imported by the user - Can be disabled with
flake.enable = false
Smart flakes defaults:
-
omnix.flakesandcachix.flakesdefault toflake.flakesif 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 showsucceeds - Checked all systems are exposed correctly