mirror of
https://gitlab.com/TECHNOFAB/nixible.git
synced 2025-12-10 09:10:08 +01:00
Ansible but with Nix. https://nixible.projects.tf
| docs | ||
| examples | ||
| lib | ||
| tests | ||
| .envrc | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE.md | ||
| README.md | ||
Nixible
A Nix-based tool for managing Ansible playbooks with type safety and reproducibility.
What is Nixible?
Nixible bridges the Nix and Ansible ecosystems by allowing you to define Ansible playbooks, inventories, and collections as Nix expressions. It provides:
- Type-safe playbook definitions using Nix's module system
- Reproducible Ansible environments with locked dependencies
- Automatic collection management from Ansible Galaxy
Quick Start
1. Define your configuration
Create a some-playbook.nix file:
{pkgs, ...}: {
collections = {
"community-general" = {
version = "8.0.0";
hash = "sha256-...";
};
};
inventory = {}; # can also be omitted, we only use localhost
playbook = [{
name = "Hello World";
hosts = "localhost";
tasks = [{
name = "Say hello";
debug.msg = "Hello from Nixible!";
}];
}];
}
2. Run with Nix
{
inputs.nixible.url = "gitlab:TECHNOFAB/nixible?dir=lib";
# outputs = ...
# nixible_lib = inputs.nixible.lib { inherit pkgs lib; };
packages.some-playbook = nixible_lib.mkNixibleCli ./some-playbook.nix;
}
nix run .#some-playbook
Documentation
Check the docs.