GitOps For NixOS Machines
  • Go 90.5%
  • Nix 9.5%
Find a file
lewo 69ee06dc03
Merge pull request #133 from ap-1/main
fix: typo in evaluation success message
2026-01-30 08:35:02 +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 docs: fix module options 2026-01-22 08:28:36 +01:00
internal fix: typo in evaluation success message 2026-01-29 19:05:45 -05:00
nix Merge pull request #42 from nlewo/expose-username 2026-01-18 08:09:37 +01:00
default.nix Allow to be imported in non-flake projects 2025-12-10 18:18:13 +01:00
flake.lock Allow to be imported in non-flake projects 2025-12-10 18:18:13 +01:00
flake.nix Allow to be imported in non-flake projects 2025-12-10 18:18:13 +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 Improve documentation 2026-01-01 11:11:41 +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