GitOps For NixOS Machines
  • Go 89.6%
  • Nix 10.4%
Find a file
2026-04-02 06:38:51 +02:00
.github/workflows Move golangci-lint to flake checks 2026-03-01 08:02:56 +01:00
cmd desktop: fix typo 2026-04-02 06:38:51 +02:00
docs Merge pull request #139 from nlewo/better-retention 2026-03-29 07:44:43 +02:00
internal Better retention mecanism 2026-03-21 10:59:03 +01:00
nix Merge pull request #139 from nlewo/better-retention 2026-03-29 07:44:43 +02:00
default.nix feat: reformat everything and add flake check 2026-02-24 21:52:29 +01:00
flake.lock feat: reformat everything and add flake check 2026-02-24 21:52:29 +01:00
flake.nix Readd go in the dev shell 2026-03-01 08:02:56 +01:00
go.mod Move golangci-lint to flake checks 2026-03-01 08:02:56 +01:00
go.sum Move golangci-lint to flake checks 2026-03-01 08:02:56 +01:00
LICENSE Add a license 2023-04-28 23:09:29 +02:00
main.go Move to internal 2024-01-31 00:06:59 +01:00
readme.md readme: add matrix room 2026-02-22 10:38:40 +01:00

comin - GitOps for NixOS Machines

comin is a NixOS deployment tool operating in pull mode. Running on a machine, it periodically polls Git repositories and deploys the NixOS configuration associated to the machine.

Features

Quick start

This is 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 enables a systemd service, which periodically pulls the main branch of the repository https://gitlab.com/your/infra.git and deploys the NixOS configuration corresponding to the machine hostname myMachine.

A new commit in the main branch of the repository https://gitlab.com/your/infra.git is then deployed in the next 60 seconds.

Comin exposes much more options which are described in the generated documentation.

Documentation

Community

We have a Matrix room at https://matrix.to/#/#nixos-comin:matrix.org.