Centralized nixpkgs version pinning for QGIS projects
This repository serves as a central flake for pinning and synchronizing nixpkgs versions across multiple QGIS repositories. By using a shared nixpkgs version, we achieve:
- 🔄 Dependency Deduplication – Avoids duplicate dependencies across projects
- ⚡ Efficient Binary Caching – Improves build times through better cache utilization
- 🔒 Consistent Environments – Ensures all projects use compatible package versions
- 🎛️ Centralized Management – Update nixpkgs in one place, propagate everywhere
This shared nixpkgs configuration is used across several QGIS infrastructure repositories:
| Project | Repository | Description |
|---|---|---|
| qgis.org | QGIS-Website | QGIS Main Website |
| planet.qgis.org | QGIS-Planet-Website | QGIS Planet Blog Aggregator |
| uc2025.qgis.org | QGIS-UC-Website | QGIS User Conference Website |
This flake exposes two nixpkgs inputs:
# flake.nix
{
description = "Shared nixpkgs versions for QGIS";
inputs.nixpkgs-25-11.url = "github:NixOS/nixpkgs/nixos-25.11";
inputs.nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs-25-11, nixpkgs-unstable }: {
inherit nixpkgs-25-11 nixpkgs-unstable;
};
}nixpkgs-25-11– Stable NixOS 25.11 releasenixpkgs-unstable– Rolling unstable channel with latest packages
To use the shared nixpkgs in your QGIS-related project:
Add this repository as an input to your flake.nix:
{
inputs = {
nixpkgs-version.url = "github:QGIS/qgis-nixpkgs-version";
nixpkgs.follows = "nixpkgs-version/nixpkgs-25-11";
};
outputs = { self, nixpkgs, nixpkgs-version, ... }: {
# Your flake outputs here
};
}After adding the input, update your lock file:
nix flake update nixpkgs-versionWhen this repository updates its nixpkgs pins, update your dependent repository:
nix flake update nixpkgsThis repository includes a GitHub Actions workflow that automatically keeps nixpkgs versions up to date.
- Schedule: Runs weekly every Sunday at 1:00 AM UTC (
0 1 * * 0) - Manual Trigger: Can be triggered manually via
workflow_dispatch - Updates: Both
nixpkgs-25-11andnixpkgs-unstable(via matrix strategy) - Process:
- Checks out the repository
- Installs Nix
- Runs
nix flake updatefor each nixpkgs version - Creates a pull request with the updated
flake.lock
When updates are available, the workflow automatically:
- Creates a pull request titled
flake: flake update [version] - Includes instructions for dependent repositories
- Waits for manual review and merge
After merging an update PR, remember to update dependent repositories with:
nix flake update nixpkgs-version- Ivan Mincik (@imincik) – Original author