GitOps For NixOS Servers and Laptops
  • Go 91.7%
  • Nix 8.3%
Find a file
lewo d1fba02146
Merge pull request #250 from RyoKusnadi/fix/fail-running-deployment-on-load
store: mark running deployments as failed when loading the state
2026-12-03 15:10:05 +01:00
.github/workflows Move golangci-lint to flake checks 2026-03-01 08:02:56 +01:00
cmd desktop: notify when a reboot is pending at connection 2026-11-30 00:20:19 +07:00
docs Reload access tokens before each fetch (#242) 2026-11-28 09:15:50 +01:00
internal store: drop state.json written by a test run 2026-12-03 18:34:30 +07:00
nix repository: bump go-git to v5.18.0 to keep extra commit headers 2026-11-25 00:55:32 +00:00
pkg deployer: remove the previousDeployment attribute 2026-11-20 19:08:52 +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 Add default NixOS module 2026-11-06 11:26:32 +01:00
go.mod repository: bump go-git to v5.18.0 to keep extra commit headers 2026-11-25 00:55:32 +00:00
go.sum repository: bump go-git to v5.18.0 to keep extra commit headers 2026-11-25 00:55:32 +00: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: use default module in example config 2026-11-12 13:38:20 +01:00

comin - GitOps for NixOS Servers and Laptops

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.

Main 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.default
          ({
            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.