Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

services.colima.enable

Whether to enable Colima, a container runtime.

Type: boolean

Default:

false

Example:

true

Declared by:

services.colima.package

The colima package to use.

Type: package

Default:

pkgs.colima

Declared by:

services.colima.bashPackage

The bashNonInteractive package to use. Used by colima’s internal scripts.

Type: package

Default:

pkgs.bashNonInteractive

Declared by:

services.colima.colimaHomeDir

Directory to store colima configuration. This also sets $COLIMA_HOME.

Type: string

Default:

if config.xdg.enable && lib.versionAtLeast config.home.stateVersion "26.05" then
  "$XDG_CONFIG_HOME/colima"
else
  ".colima"

Example:

${config.xdg.configHome}/colima

Declared by:

services.colima.coreutilsPackage

The coreutils package to use. Used in various ways by colima.

Type: package

Default:

pkgs.coreutils

Declared by:

services.colima.curlPackage

The curl package to use. Used by colima to download images.

Type: package

Default:

pkgs.curl

Declared by:

services.colima.dockerPackage

The docker package to use. Used by colima to activate profiles. Not needed if no profile is set to isActive.

Type: package

Default:

pkgs.docker

Declared by:

services.colima.kubectlPackage

The kubectl package to use. Used by colima when kubernetes is enabled in the profile.

Type: package

Default:

pkgs.kubectl

Declared by:

services.colima.limaHomeDir

Directory to store lima files. This also sets $LIMA_HOME.

Type: null or string

Default:

"Colima uses $COLIMA_HOME/_lima by default."

Example:

${config.xdg.dataHome}/lima

Declared by:

services.colima.perlPackage

The perl package to use. Used by colima during image download for the shasum command.

Type: package

Default:

pkgs.perl

Declared by:

services.colima.profiles

Profiles allow multiple colima configurations. The default profile is active by default. If you have used colima before, you may need to delete existing configuration using colima delete or use a different profile.

Note that removing a configured profile will not delete the corresponding Colima instance. You will need to manually run colima delete <profile-name> to remove the instance and release resources.

Type: attribute set of (submodule)

Default:

{
  default = {
    isActive = true;
    isService = true;
    setDockerHost = lib.versionAtLeast config.home.stateVersion "26.05";
  };
};

Example:

''
  {
    default = {
      isActive = true;
      isService = true;
      setDockerHost = true;
    };
    rosetta = {
      isService = true;
      settings.rosetta = true;
    };
    powerful = {
      settings.cpu = 8;
    };
  };
''

Declared by:

services.colima.profiles.<name>.isActive

Whether to set this profile as:

  • active docker context
  • active kubernetes context
  • active incus remote Exactly one or zero profiles should have this option set.

Type: boolean

Default:

false

Example:

true

Declared by:

services.colima.profiles.<name>.isService

Whether this profile will run as a service.

Type: boolean

Default:

false

Example:

true

Declared by:

services.colima.profiles.<name>.logFile

Combined stdout and stderr log file for the Colima service.

Type: absolute path

Default:

${config.xdg.stateHome}/colima/${name}.log

Declared by:

services.colima.profiles.<name>.name

The profile’s name.

Type: string (read only)

Default:

"‹name›"

Declared by:

services.colima.profiles.<name>.setDockerHost

Set this context as $DOCKER_HOST. Exactly one or zero profiles should have this option set.

Type: boolean

Default:

false

Example:

true

Declared by:

services.colima.profiles.<name>.settings

Colima configuration settings, see https://github.com/abiosoft/colima/blob/main/embedded/defaults/colima.yaml or run colima template.

Type: YAML 1.1 value

Default:

{ }

Example:

''
  {
    cpu = 2;
    disk = 100;
    memory = 2;
    arch = "host";
    runtime = "docker";
    hostname = null;
    kubernetes = {
      enabled = false;
      version = "v1.33.3+k3s1";
      k3sArgs = [ "--disable=traefik" ];
      port = 0;
    };
    autoActivate = true;
    network = {
      address = false;
      mode = "shared";
      interface = "en0";
      preferredRoute = false;
      dns = [ ];
      dnsHosts = {
        "host.docker.internal" = "host.lima.internal";
      };
      hostAddresses = false;
    };
    forwardAgent = false;
    docker = { };
    vmType = "qemu";
    portForwarder = "ssh";
    rosetta = false;
    binfmt = true;
    nestedVirtualization = false;
    mountType = "sshfs";
    mountInotify = false;
    cpuType = "host";
    provision = [ ];
    sshConfig = true;
    sshPort = 0;
    mounts = [ ];
    diskImage = "";
    rootDisk = 20;
    env = { };
  }
''

Declared by:

services.colima.sshPackage

The openssh package to use. Used by colima to manage the vm.

Type: package

Default:

pkgs.openssh

Declared by: