{"id":13687966,"url":"https://github.com/juspay/jenkins-nix-ci","last_synced_at":"2025-07-23T21:05:52.952Z","repository":{"id":152872858,"uuid":"616630463","full_name":"juspay/jenkins-nix-ci","owner":"juspay","description":"A NixOS module for Jenkins, optimized specifically for running projects using Nix.","archived":false,"fork":false,"pushed_at":"2024-05-22T20:13:34.000Z","size":225,"stargazers_count":24,"open_issues_count":9,"forks_count":2,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-05-22T21:36:01.023Z","etag":null,"topics":["ci","jenkins","nixos"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juspay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-20T19:07:44.000Z","updated_at":"2024-06-21T06:46:34.762Z","dependencies_parsed_at":"2024-05-22T21:48:13.755Z","dependency_job_id":null,"html_url":"https://github.com/juspay/jenkins-nix-ci","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fjenkins-nix-ci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fjenkins-nix-ci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fjenkins-nix-ci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fjenkins-nix-ci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juspay","download_url":"https://codeload.github.com/juspay/jenkins-nix-ci/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251899314,"owners_count":21661991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","jenkins","nixos"],"created_at":"2024-08-02T15:01:04.183Z","updated_at":"2025-07-23T21:05:52.941Z","avatar_url":"https://github.com/juspay.png","language":"Nix","funding_links":[],"categories":["Nix"],"sub_categories":[],"readme":"[![project chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)][zulip]\n\n# jenkins-nix-ci\n\nA [NixOS module][nixos-mod] to run [Jenkins][jenkins], optimized specifically for running projects using [Nix].\n\n## Features\n\n- Fully nixified\n    - [x] Jenkins configuration declared in Nix (via [configuration-as-code](https://github.com/jenkinsci/configuration-as-code-plugin) plugin)\n    - [x] [sops-nix] for secrets management, for use in Jenkins credentials. Known limitation: only JSON format is supported.\n    - [x] Jenkins plugins are managed by [jenkinsPlugins2nix](https://github.com/Fuuzetsu/jenkinsPlugins2nix)\n- Isolated build agents\n    - [x] [NixOS containers](https://nixos.wiki/wiki/NixOS_Containers) as build agents (runs in local node)\n    - [x] External SSH slaves (useful to run macOS build nodes)\n- CI features as NixOS modules, encapsulated along with their associated groovy library for referencing in `Jenkinsfile`\n    - [x] `nix`: provides `nixCI` (using [nixci](https://github.com/srid/nixci)) to build all flake outputs, and sets `env.FLAKE_OUTPUTS` to the list of outputs built.\n        - Uses `--no-update-lock-file` (thus fails on out of sync `flake.lock` files)\n        - Supports sub flakes ([example](https://github.com/srid/haskell-flake/pull/179)) via `nixci`\n    - [x] [cachix](https://www.cachix.org/): provides `cachixPush` and `cachixUse` pipeline steps\n        - `cachixPush` will push the `env.FLAKE_OUTPUTS` built by the `nix` feature\n    - [x] [docker](https://www.docker.com/): provides `dockerPush` pipeline step\n    - [x] `githubApp`: provides Github integration for CI status reporting\n\n## Examples\n\n- https://github.com/nammayatri/jenkins-config (used by [Nammayatri](https://www.nammayatri.in/))\n- [srid/nixos-config](https://github.com/srid/nixos-config/blob/aeb13a8b06692144910526be0c342fed017015b4/nixos/jenkins.nix)\n\n## Plugins\n\nTo update the plugins, run `nix-prefetch-jenkins-plugins \u003e nix/jenkins/plugins.nix`. `nix-prefetch-jenkins-plugins` must have been added to the devShell. See the aforementioned example.\n\n## Secrets\n\nWe use [sops-nix] to manage secrets used by the individual CI features. Convert your SSH key (ed25519) to age, which sops uses. With macOS \u0026 1Password, it would look like:\n\n```sh\nnix run nixpkgs#ssh-to-age  \u003c\u003c\u003c \"$(op read 'op://Personal/id_ed25519/public key')\"\nnix run nixpkgs#ssh-to-age -- --private-key -i \u003c(op read 'op://Personal/id_ed25519/actual private') \u003e ~/.config/sops/age/keys.txt\n# ^ $HOME/Library/Application\\ Support/sops/age/keys.txt actually\n```\n\nYou also want to get the host key (`ssh-keyscan localhost | ssh-to-age`) of the machine being deployed.\n\nPut both these public age keys in `.sops.yaml` of the repository.\n\n## Discussion\n\n- [Zulip][zulip]\n\n[sops-nix]: https://github.com/Mic92/sops-nix\n[nixos-mod]: https://nixos.wiki/wiki/NixOS_modules\n[jenkins]: https://www.jenkins.io/\n[Nix]: https://zero-to-nix.com/\n[zulip]: https://nixos.zulipchat.com/#narrow/stream/416818-jenkins-nix-ci\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuspay%2Fjenkins-nix-ci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuspay%2Fjenkins-nix-ci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuspay%2Fjenkins-nix-ci/lists"}