PitchHut
Log in / Sign up
comin
4 views
Streamline NixOS deployment with GitOps in a snap.
Pitch

comin is a powerful NixOS deployment tool that simplifies configuration management through GitOps. By polling Git repositories, it automates deployment while supporting branch testing and machine migrations. With features like Prometheus integration and local remotes, comin ensures your NixOS environments are always up-to-date and reliable.

Description

comin is an innovative deployment tool designed specifically for NixOS machines, operating seamlessly in a pull mode. By periodically polling Git repositories, comin ensures that your NixOS configurations are always up-to-date and aligned with the latest changes pushed to your version control system.

Key Features

  • Git Push to Deploy: Effortlessly deploy your NixOS configurations by simply pushing updates to your Git repository.
  • Test Branch Support: Test changes in isolated branches before merging, allowing for safe experimentation and configuration tweaks.
  • Multiple Git Remotes: Enhance your system's reliability by polling multiple Git remotes simultaneously, effectively preventing single points of failure (SPOF).
  • Machine Migrations: Flexibly migrate configurations between machines with robust support for transitioning settings seamlessly.
  • Rapid Iterations with Local Remotes: Speed up your development cycle by utilizing local repositories for testing changes faster.
  • Prometheus Metrics: Monitor your deployments and system health with integrated observability via Prometheus metrics.
  • Profile Management: Easily create and delete system profiles as needed, simplifying system management.

Quick Start Example

To get started with comin, here's a basic flake.nix example:

{
  inputs = {
    nixpkgs.url = "github:nixOS/nixpkgs";
    comin = {
      url = "github:nlewo/comin";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
  outputs = { self, nixpkgs, comin }: {
    nixosConfigurations = {
      myMachine = nixpkgs.lib.nixosSystem {
        system = "x86_64-linux";
        modules = [
          comin.nixosModules.comin
          ({...}: {
            services.comin = {
              enable = true;
              remotes = [{
                name = "origin";
                url = "https://gitlab.com/your/infra.git";
                branches.main.name = "main";
              }];
            };
          })
        ];
      };
    };
  };
}

This configuration enables a systemd service that automatically pulls updates from the main branch of your specified Git repository, deploying the corresponding NixOS configuration within just 60 seconds of a new commit.

Documentation

For more advanced usage and configurations, refer to the following documentation:

Experience the power of GitOps with comin – streamline your NixOS deployments with confidence and ease!