Configuration Options#
To see all available resources options, use the nixidy options search powered by NüschtOS.
applications#
An application is a single Argo CD application that will be rendered by nixidy.
The resources will be rendered into it's own directory and an Argo CD application created for it.
Type: attribute set of (submodule)
Default:
{ }
Example:
{
nginx = {
namespace = "nginx";
resources = {
deployments = {
nginx = {
spec = {
replicas = 3;
selector = {
matchLabels = {
app = "nginx";
};
};
template = {
metadata = {
labels = {
app = "nginx";
};
};
spec = {
containers = {
nginx = {
image = "nginx:1.25.1";
imagePullPolicy = "IfNotPresent";
};
};
securityContext = {
fsGroup = 1000;
};
};
};
};
};
};
services = {
nginx = {
spec = {
ports = {
http = {
port = 80;
};
};
selector = {
app = "nginx";
};
};
};
};
};
};
}
Declared by:
applications.<name>.annotations#
Annotations to add to the rendered ArgoCD application.
Type: attribute set of string
Default:
{ }
Declared by:
applications.<name>.compareOptions.ignoreExtraneous#
Sets IgnoreExtraneous compare option for the application. Only setting it as true
has any effect.
Type: null or boolean
Default:
null
Declared by:
applications.<name>.compareOptions.includeMutationWebhook#
Sets IncludeMutationWebhook compare option for the application. Only setting it as true
has any effect.
Type: null or boolean
Default:
null
Declared by:
applications.<name>.compareOptions.serverSideDiff#
Sets ServerSideDiff compare option for the application. Leave as null
for the default behavior.
Type: null or boolean
Default:
null
Declared by:
applications.<name>.createNamespace#
Whether or not a namespace resource should be automatically created.
Type: boolean
Default:
false
Declared by:
applications.<name>.destination.server#
The Kubernetes server that ArgoCD should deploy the application to.
Type: string
Default:
config.nixidy.defaults.destination.server
Declared by:
applications.<name>.helm.releases#
Helm releases to template and add to the rendered application's resources.
Type: attribute set of (submodule)
Default:
{ }
Declared by:
applications.<name>.helm.releases.<name>.chart#
Derivation containing the helm chart for the release.
Type: package or path
Declared by:
applications.<name>.helm.releases.<name>.extraOpts#
Extra options to pass to helm template
that is run when rendering the helm chart.
Type: list of string
Default:
[ ]
Example:
[
"--no-hooks"
]
Declared by:
applications.<name>.helm.releases.<name>.includeCRDs#
Whether or not to include CRDs in the helm release.
Type: boolean
Default:
true
Declared by:
applications.<name>.helm.releases.<name>.name#
Name of the helm release.
Type: string
Default:
"‹name›"
Declared by:
applications.<name>.helm.releases.<name>.namespace#
Namespace for the release.
Type: string
Default:
config.applications.<name>.namespace
Declared by:
applications.<name>.helm.releases.<name>.transformer#
Function that will be applied to the list of rendered manifests after the helm templating.
Type: function that evaluates to a(n) list of attribute set of anything
Default:
config.nixidy.defaults.helm.transformer
Example:
map (lib.kube.removeLabels ["helm.sh/chart"])
Declared by:
applications.<name>.helm.releases.<name>.values#
Values to pass to the helm chart when rendering it.
Type: attribute set of anything
Default:
{ }
Declared by:
applications.<name>.kustomize.applications#
Kustomize applications to render and add to the rendered application's resources.
Type: attribute set of (submodule)
Default:
{ }
Example:
{
argocd = {
namespace = "argocd";
# Equivalent to `github.com/argoproj/argo-cd/manifests/cluster-install?ref=v2.9.3`
# in kustomization.yaml.
kustomization = {
src = pkgs.fetchFromGitHub {
owner = "argoproj";
repo = "argo-cd";
rev = "v2.9.3";
hash = "sha256-GaY4Cw/LlSwy35umbB4epXt6ev8ya19UjHRwhDwilqU=";
};
path = "manifests/cluster-install";
};
};
};
Declared by:
applications.<name>.kustomize.applications.<name>.kustomization.path#
Path relative to the base of src
to the entrypoint kustomization directory.
Type: string
Declared by:
applications.<name>.kustomize.applications.<name>.kustomization.src#
Derivation containing all the kustomize bases and overlays.
Type: package or path
Declared by:
applications.<name>.kustomize.applications.<name>.name#
Name of the kustomize application.
Type: string
Default:
"‹name›"
Declared by:
applications.<name>.kustomize.applications.<name>.namespace#
Namespace for the kustomize application.
Type: string
Default:
config.applications.<name>.namespace
Declared by:
applications.<name>.kustomize.applications.<name>.transformer#
Function that will be applied to the list of rendered manifests from kustomize.
Type: function that evaluates to a(n) list of attribute set of anything
Default:
config.nixidy.defaults.kustomize.transformer
Declared by:
applications.<name>.name#
Name of the application.
Type: string
Default:
"‹name›"
Declared by:
applications.<name>.namespace#
Namespace to deploy application into (defaults to name).
Type: string
Default:
"‹name›"
Declared by:
applications.<name>.output.path#
Name of the folder that contains all rendered resources for the application. Relative to the root of the repository.
Type: string
Default:
"‹name›"
Declared by:
applications.<name>.project#
ArgoCD project to make application a part of.
Type: string
Default:
"default"
Declared by:
applications.<name>.resources#
Kubernetes resources for the application.
The entire list of available resource options is too large for the current documentation setup but can be searched in the nixidy options search powered by NüschtOS.
Type: attribute set
Default:
{ }
Example:
{
deployments = {
nginx = {
spec = {
replicas = 3;
selector = {
matchLabels = {
app = "nginx";
};
};
template = {
metadata = {
labels = {
app = "nginx";
};
};
spec = {
containers = {
nginx = {
image = "nginx:1.25.1";
imagePullPolicy = "IfNotPresent";
};
};
securityContext = {
fsGroup = 1000;
};
};
};
};
};
};
services = {
nginx = {
spec = {
ports = {
http = {
port = 80;
};
};
selector = {
app = "nginx";
};
};
};
};
}
Declared by:
applications.<name>.syncPolicy.autoSync.enabled#
Specifies if application should automatically sync.
Type: boolean
Default:
config.nixidy.defaults.syncPolicy.autoSync.enabled
Declared by:
applications.<name>.syncPolicy.autoSync.prune#
Specifies if resources should be pruned during auto-syncing.
Type: boolean
Default:
config.nixidy.defaults.syncPolicy.autoSync.prune
Declared by:
applications.<name>.syncPolicy.autoSync.selfHeal#
Specifies if partial app sync should be executed when resources are changed only in target Kubernetes cluster and no git change detected.
Type: boolean
Default:
config.nixidy.defaults.syncPolicy.autoSync.selfHeal
Declared by:
applications.<name>.syncPolicy.syncOptions.applyOutOfSyncOnly#
Currently when syncing using auto sync Argo CD applies every object in the application. For applications containing thousands of objects this takes quite a long time and puts undue pressure on the api server. Turning on selective sync option which will sync only out-of-sync resources.
Type: boolean
Default:
false
Declared by:
applications.<name>.syncPolicy.syncOptions.failOnSharedResource#
By default, Argo CD will apply all manifests found in the git path configured in the Application regardless if the
resources defined in the yamls are already applied by another Application. If the failOnSharedResource
sync option
is set, Argo CD will fail the sync whenever it finds a resource in the current Application that is already applied in
the cluster by another Application.
Type: boolean
Default:
false
Declared by:
applications.<name>.syncPolicy.syncOptions.pruneLast#
This feature is to allow the ability for resource pruning to happen as a final, implicit wave of a sync operation, after the other resources have been deployed and become healthy, and after all other waves completed successfully.
Type: boolean
Default:
false
Declared by:
applications.<name>.syncPolicy.syncOptions.replace#
By default, Argo CD executes kubectl apply
operation to apply the configuration stored in Git.
In some cases kubectl apply
is not suitable. For example, resource spec might be too big and won't fit into
kubectl.kubernetes.io/last-applied-configuration
annotation that is added by kubectl apply.
If the replace = true;
sync option is set the Argo CD will use kubectl replace
or kubectl create
command
to apply changes.
Type: boolean
Default:
false
Declared by:
applications.<name>.syncPolicy.syncOptions.serverSideApply#
By default, Argo CD executes kubectl apply
operation to apply the configuration stored in Git.
This is a client side operation that relies on kubectl.kubernetes.io/last-applied-configuration
annotation to
store the previous resource state.
If serverSideApply = true;
sync option is set, Argo CD will use kubectl apply --server-side
command to apply changes.
More info here.
Type: boolean
Default:
false
Declared by:
applications.<name>.yamls#
List of Kubernetes manifests declared in YAML strings. They will be parsed and added to the application's
resources
where they can be overwritten and modified.
Can be useful for reading existing YAML files (i.e. [(builtins.readFile ./deployment.yaml)]
).
Type: list of string
Default:
[ ]
Example:
[
''
apiVersion: v1
kind: Namespace
metadata:
name: default
''
]
Declared by:
nixidy.appOfApps.name#
Name of the application for bootstrapping all other applications (app of apps pattern).
Type: string
Default:
"apps"
Declared by:
nixidy.appOfApps.namespace#
Destination namespace for generated Argo CD Applications in the app of apps applications.
Type: string
Default:
"argocd"
Declared by:
nixidy.appOfApps.project#
The project of the generated bootstrap app for appOfApps
Type: string
Default:
"default"
Declared by:
nixidy.build.revision#
The revision being built. Will be written to .revision
in the environment destination directory.
Type: null or string
Default:
null
Example:
if (self ? rev) then self.rev else self.dirtyRev
Declared by:
nixidy.charts#
Attrset of derivations containing helm charts. This will be passed as charts
to every module.
Type: attribute set of anything
Default:
{ }
Declared by:
nixidy.chartsDir#
Path to a directory containing sub-directory structure that can be used to build a charts attrset. This will be passed as charts
to every module.
Type: null or path
Default:
null
Declared by:
nixidy.defaults.destination.server#
The Kubernetes server that ArgoCD should deploy all applications to.
This is the default value for all applications if not explicitly set for the application.
Type: string
Default:
"https://kubernetes.default.svc"
Declared by:
nixidy.defaults.helm.transformer#
Function that will be applied to the list of rendered manifests after the helm templating. This option applies to all helm releases in all applications unless explicitly specified there.
Type: function that evaluates to a(n) list of attribute set of anything
Default:
res: res
Example:
map (lib.kube.removeLabels ["helm.sh/chart"])
Declared by:
nixidy.defaults.kustomize.transformer#
Function that will be applied to the list of rendered manifests after kustomize rendering. This option applies to all kustomize applications in all nixidy applications unless explicitly specified there.
Type: function that evaluates to a(n) list of attribute set of anything
Default:
res: res
Example:
map (lib.kube.removeLabels ["app.kubernetes.io/version"])
Declared by:
nixidy.defaults.syncPolicy.autoSync.enabled#
Specifies if applications should automatically sync.
This is the default value for all applications if not explicitly set for the application.
Type: boolean
Default:
false
Declared by:
nixidy.defaults.syncPolicy.autoSync.prune#
Specifies if resources should be pruned during auto-syncing.
This is the default value for all applications if not explicitly set for the application.
Type: boolean
Default:
false
Declared by:
nixidy.defaults.syncPolicy.autoSync.selfHeal#
Specifies if partial app sync should be executed when resources are changed only in target Kubernetes cluster and no git change detected.
This is the default value for all applications if not explicitly set for the application.
Type: boolean
Default:
false
Declared by:
nixidy.extraFiles#
Extra files to write in the generated stage.
Type: attribute set of (submodule)
Default:
{ }
Declared by:
nixidy.extraFiles.<name>.path#
Path of output file.
Type: string
Default:
"‹name›"
Declared by:
nixidy.extraFiles.<name>.text#
Text of the output file.
Type: strings concatenated with "\n"
Declared by:
nixidy.resourceImports#
List of modules to import for resource defintion options.
Type: list of (package or path or function that evaluates to a(n) (attribute set))
Default:
[ ]
Declared by:
nixidy.target.branch#
The destination branch of the generated applications.
Type: string
Declared by:
nixidy.target.repository#
The repository URL to put in all generated applications.
Type: string
Declared by:
nixidy.target.rootPath#
The root path of all generated applications in the repository.
Type: string
Default:
"./"
Declared by: