Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,30 @@ var runCmd = &cobra.Command{
}

var executor executorPkg.Executor
switch cfg.RepositoryType {
case "flake":
executor, err = executorPkg.NewNixOSFlake()
switch cfg.ExecutorConfig.Type {
case "garnix":
systemAttr := "nixosConfigurations"
if runtime.GOOS == "darwin" {
executor, err = executorPkg.NewNixDarwinFlake()
systemAttr = "darwinConfigurations"
}
executor, err = executorPkg.NewGarnixExecutor(cfg.ExecutorConfig.GarnixConfig, systemAttr)
case "hydra":
systemAttr := "nixosConfigurations"
if runtime.GOOS == "darwin" {
systemAttr = "darwinConfigurations"
}
executor, err = executorPkg.NewHydraExecutor(cfg.ExecutorConfig.HydraConfig, systemAttr)
default:
switch cfg.RepositoryType {
case "flake":
if runtime.GOOS == "darwin" {
executor, err = executorPkg.NewNixDarwinFlake()
} else {
executor, err = executorPkg.NewNixOSFlake()
}
case "nix":
executor, err = executorPkg.NewNixOSNix()
}
case "nix":
executor, err = executorPkg.NewNixOSNix()
}
if err != nil {
logrus.Errorf("Failed to create the executor: %s", err)
Expand Down
308 changes: 308 additions & 0 deletions docs/generated-module-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,314 @@ string



## services\.comin\.executor



Select which executor will be used for evaluating and building the system configuration\.

The ` garnix ` executor delegates evaluation and building to garnix\.io and fetches
the result from its binary cache\. For this to work, the user must add
` cache.garnix.io ` to ` nix.settings.substituters ` and the corresponding
` cache.garnix.io-1:... ` key to ` nix.settings.trusted-public-keys `\.

The ` hydra ` executor delegates evaluation and building to a Hydra CI instance and
fetches the result from its binary cache\. For this to work, the user must add the
corresponding cache URL to ` nix.settings.substituters ` and the matching public key
to ` nix.settings.trusted-public-keys `\. Only flake-based jobsets are supported\.



*Type:*
submodule



*Default:*

```nix
{ }
```



## services\.comin\.executor\.garnix



Configuration for the Garnix executor\.



*Type:*
submodule



*Default:*

```nix
{ }
```



## services\.comin\.executor\.garnix\.baseUrl



Base URL for the Garnix API\. Defaults to https://garnix\.io/ when empty\.



*Type:*
string



*Default:*

```nix
""
```



## services\.comin\.executor\.garnix\.cacheUrl



URL of the Garnix binary cache\. Defaults to https://cache\.garnix\.io/ when empty\.



*Type:*
string



*Default:*

```nix
""
```



## services\.comin\.executor\.garnix\.cache_size



LRU cache size for drvPath -> outPath mappings\. Defaults to 2 when 0\.



*Type:*
signed integer



*Default:*

```nix
0
```



## services\.comin\.executor\.garnix\.retry_interval



Polling interval (in seconds) when waiting for a Garnix build\. Defaults to 60 when 0\.



*Type:*
signed integer



*Default:*

```nix
0
```



## services\.comin\.executor\.hydra



Configuration for the Hydra executor\.



*Type:*
submodule



*Default:*

```nix
{ }
```



## services\.comin\.executor\.hydra\.base_url



Base URL of the Hydra instance, e\.g\. https://hydra\.example\.org\.



*Type:*
string



*Default:*

```nix
""
```



## services\.comin\.executor\.hydra\.job_name



Job name to fetch from each evaluation\. Defaults to the hostname when empty\.



*Type:*
string



*Default:*

```nix
""
```



## services\.comin\.executor\.hydra\.jobset_prefix



Optional prefix prepended to the deployed branch name
to form the Hydra jobset name to scan\. For example,
prefix ` nixos- ` with branch ` main ` scans jobset
` nixos-main `\. When empty, the jobset name equals the
branch name\.



*Type:*
string



*Default:*

```nix
""
```



## services\.comin\.executor\.hydra\.max_eval_pages



Number of evaluation pages to scan per poll cycle\. Defaults to 5 when 0\.



*Type:*
signed integer



*Default:*

```nix
0
```



## services\.comin\.executor\.hydra\.project



Hydra project name\.



*Type:*
string



*Default:*

```nix
""
```



## services\.comin\.executor\.hydra\.retry_interval



Polling interval (in seconds) when waiting for a Hydra build\. Defaults to 60 when 0\.



*Type:*
signed integer



*Default:*

```nix
0
```



## services\.comin\.executor\.type



Type of executor to use (nix, garnix or hydra)\.



*Type:*
one of “nix”, “garnix”, “hydra”



*Default:*

```nix
"nix"
```



## services\.comin\.exporter


Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ go 1.25.0
require (
charm.land/lipgloss/v2 v2.0.2
github.com/ProtonMail/go-crypto v1.1.5
github.com/charmbracelet/bubbles v1.0.0
github.com/charmbracelet/bubbletea v1.3.10
github.com/dustin/go-humanize v1.0.1
github.com/gen2brain/beeep v0.11.2
github.com/go-co-op/gocron/v2 v2.11.0
github.com/go-git/go-git/v5 v5.11.0
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
github.com/google/uuid v1.6.0
github.com/prometheus/client_golang v1.19.0
github.com/sirupsen/logrus v1.9.3
Expand All @@ -27,7 +29,6 @@ require (
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/charmbracelet/bubbles v1.0.0 // indirect
github.com/charmbracelet/colorprofile v0.4.2 // indirect
github.com/charmbracelet/lipgloss v1.1.0 // indirect
github.com/charmbracelet/ultraviolet v0.0.0-20251205161215-1948445e3318 // indirect
Expand All @@ -48,7 +49,6 @@ require (
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/godbus/dbus/v5 v5.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackmordaunt/icns/v3 v3.0.1 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ github.com/charmbracelet/ultraviolet v0.0.0-20251205161215-1948445e3318 h1:OqDqx
github.com/charmbracelet/ultraviolet v0.0.0-20251205161215-1948445e3318/go.mod h1:Y6kE2GzHfkyQQVCSL9r2hwokSrIlHGzZG+71+wDYSZI=
github.com/charmbracelet/x/ansi v0.11.6 h1:GhV21SiDz/45W9AnV2R61xZMRri5NlLnl6CVF7ihZW8=
github.com/charmbracelet/x/ansi v0.11.6/go.mod h1:2JNYLgQUsyqaiLovhU2Rv/pb8r6ydXKS3NIttu3VGZQ=
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8=
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs=
github.com/charmbracelet/x/cellbuf v0.0.15 h1:ur3pZy0o6z/R7EylET877CBxaiE1Sp1GMxoFPAIztPI=
github.com/charmbracelet/x/cellbuf v0.0.15/go.mod h1:J1YVbR7MUuEGIFPCaaZ96KDl5NoS0DAWkskup+mOY+Q=
github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f h1:pk6gmGpCE7F3FcjaOEKYriCvpmIN4+6OS/RD0vm4uIA=
Expand Down
Loading
Loading