_module.args

Additional arguments passed to each module in addition to ones like lib, config, and pkgs, modulesPath. This option is also available to all submodules. Submodules do not inherit args from their parent module, nor do they provide args to their parent module or sibling submodules. The sole exception to this is the argument name which is provided by parent modules to a submodule and contains the attribute name the submodule is bound to, or a unique generated name if it is not bound to an attribute. Some arguments are already passed by default, of which the following cannot be changed with this option: lib: The nixpkgs library. config: The results of all options after merging the values from all modules together. options: The options declared in all modules. specialArgs: The specialArgs argument passed to evalModules. All attributes of specialArgs Whereas option values can generally depend on other option values thanks to laziness, this does not apply to imports, which must be computed statically before anything else. For this reason, callers of the module system can provide specialArgs which are available during import resolution. For NixOS, specialArgs includes modulesPath, which allows you to import extra modules from the nixpkgs package tree without having to somehow make the module aware of the location of the nixpkgs or NixOS directories. { modulesPath, ... }: { imports = [ (modulesPath + "/profiles/minimal.nix") ]; } For NixOS, the default value for this option includes at least this argument: pkgs: The nixpkgs package set according to the option.

type

lazy attribute set of raw value

gh-actions

Configure your github actions CI/CD

type

attribute set of submodule

default

{
  gh-actions = {};
}

gh-actions.<name>.enable

Whether to enable Github Actions CI-CD.

type

boolean

example

{
  gh-actions.<name>.enable = true;
}

default

{
  gh-actions.<name>.enable = false;
}

gh-actions.<name>.build

Command to run as build step

type

null or non-empty string

example

{
  gh-actions.<name>.build = "npm run build";
}

default

{
  gh-actions.<name>.build = null;
}

gh-actions.<name>.cache

CACHIX binary cache configuration

type

null or submodule

example

{
  gh-actions.<name>.cache = {
    key-name = "CACHIX_SIGNING_KEY";
    name = "MyCACHIXCacheName";
  };
}

default

{
  gh-actions.<name>.cache = null;
}

gh-actions.<name>.cache.key-name

Name of GH Secret with CACHIX SIGNING KEY

type

null or non-empty string

example

{
  gh-actions.<name>.cache.key-name = "CACHIX_SIGNING_KEY";
}

default

{
  gh-actions.<name>.cache.key-name = null;
}

gh-actions.<name>.cache.name

Name of your cache in CACHIX

type

non-empty string

example

{
  gh-actions.<name>.cache.name = "MyCACHIXCacheName";
}

default

{
  gh-actions.<name>.cache.name = null;
}

gh-actions.<name>.cache.token-name

Name of GH Secret with CACHIX AUTH TOKEN

type

null or non-empty string

example

{
  gh-actions.<name>.cache.token-name = "CACHIX_AUTH_TOKEN";
}

default

{
  gh-actions.<name>.cache.token-name = "CACHIX_AUTH_TOKEN";
}

gh-actions.<name>.deploy

Command to run as deploy step

type

null or non-empty string

example

{
  gh-actions.<name>.deploy = "aws s3 sync ./build s3://my-bucket";
}

default

{
  gh-actions.<name>.deploy = null;
}

gh-actions.<name>.env

env vars for steps

type

submodule

default

{
  gh-actions.<name>.env = {};
}

gh-actions.<name>.env.build

Env variable used by steps

type

attribute set of string

example

{
  gh-actions.<name>.env.build = {
    GIPHY_TOKEN = "${{ secret.GH_ACTIONS_SSH_KEY }}";
  };
}

default

{
  gh-actions.<name>.env.build = {};
}

gh-actions.<name>.env.deploy

Env variable used by steps

type

attribute set of string

example

{
  gh-actions.<name>.env.deploy = {
    GIPHY_TOKEN = "${{ secret.GH_ACTIONS_SSH_KEY }}";
  };
}

default

{
  gh-actions.<name>.env.deploy = {};
}

gh-actions.<name>.env.post-deploy

Env variable used by steps

type

attribute set of string

example

{
  gh-actions.<name>.env.post-deploy = {
    GIPHY_TOKEN = "${{ secret.GH_ACTIONS_SSH_KEY }}";
  };
}

default

{
  gh-actions.<name>.env.post-deploy = {};
}

gh-actions.<name>.env.pre-build

Env variable used by steps

type

attribute set of string

example

{
  gh-actions.<name>.env.pre-build = {
    GIPHY_TOKEN = "${{ secret.GH_ACTIONS_SSH_KEY }}";
  };
}

default

{
  gh-actions.<name>.env.pre-build = {};
}

gh-actions.<name>.env.test

Env variable used by steps

type

attribute set of string

example

{
  gh-actions.<name>.env.test = {
    GIPHY_TOKEN = "${{ secret.GH_ACTIONS_SSH_KEY }}";
  };
}

default

{
  gh-actions.<name>.env.test = {};
}

gh-actions.<name>.on

When this build should be triggered

type

attribute set of anything

example

{
  gh-actions.<name>.on = {
    push = {
      branches = [
        "master"
      ];
    };
  };
}

default

{
  gh-actions.<name>.on = {
    push = {
      branches = [
        "master"
      ];
    };
  };
}

gh-actions.<name>.post-deploy

Command that run after deploy

type

null or non-empty string

example

{
  gh-actions.<name>.post-deploy = "echo Im done";
}

default

{
  gh-actions.<name>.post-deploy = null;
}

gh-actions.<name>.pre-build

Command to run before build

type

null or non-empty string

example

{
  gh-actions.<name>.pre-build = "npm i";
}

default

{
  gh-actions.<name>.pre-build = null;
}

gh-actions.<name>.ssh

https://github.com/marketplace/actions/install-ssh-key Config for ssh installation There are two reasons to set it

  1. our deploy runs in ssh
  2. we have some private git repository

In this last case we should add your public key to some user with repository access (in github) or to our private server.

type

null or attribute set of string

example

{
  gh-actions.<name>.ssh = {
    key = "${{ secret.GH_ACTIONS_SSH_KEY }}";
  };
}

default

{
  gh-actions.<name>.ssh = null;
}

gh-actions.<name>.ssh-secret-name

Name of GH Secret with PRIVATE SSH KEY for more advanced usage try ssh option

type

null or non-empty string

example

{
  gh-actions.<name>.ssh-secret-name = "GH_ACTIONS_SSH_KEY";
}

default

{
  gh-actions.<name>.ssh-secret-name = null;
}

gh-actions.<name>.test

Command to run as test step

type

null or non-empty string

example

{
  gh-actions.<name>.test = "npm test";
}

default

{
  gh-actions.<name>.test = null;
}