GitOps For NixOS Machines
  • Go 89.9%
  • Nix 10.1%
Find a file
lewo d5bbf20a7e
Merge pull request #140 from Keyruu/nixfmt
feat: reformat everything and add flake check
2026-02-25 11:30:57 +01:00
.github/workflows enable race detector in ci 2025-08-26 13:15:19 +12:00
cmd Improve notifications 2026-01-11 19:07:57 +01:00
docs feat: reformat everything and add flake check 2026-02-24 21:52:29 +01:00
internal feat: use two gauges for suspend and reboot 2026-02-08 11:27:57 +01:00
nix feat: reformat everything and add flake check 2026-02-24 21:52:29 +01: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 feat: reformat everything and add flake check 2026-02-24 21:52:29 +01:00
go.mod Add comin desktop command 2025-12-19 17:10:27 +01:00
go.sum Add comin desktop command 2025-12-19 17:10:27 +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.