mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2026-02-02 09:25:10 +01:00
fmt
This commit is contained in:
parent
ee38caab0e
commit
7ba59d844f
4 changed files with 24 additions and 14 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
deployment = import ./deployment { };
|
deployment = import ./deployment {};
|
||||||
testing = import ./testing { };
|
testing = import ./testing {};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,15 @@
|
||||||
{ kubenix ? import ../../../.. }:
|
{kubenix ? import ../../../..}:
|
||||||
kubenix.evalModules.${builtins.currentSystem} {
|
kubenix.evalModules.${builtins.currentSystem} {
|
||||||
module = {kubenix, config, pkgs, ...}: {
|
module = {
|
||||||
|
kubenix,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = with kubenix.modules; [k8s docker];
|
imports = with kubenix.modules; [k8s docker];
|
||||||
docker = {
|
docker = {
|
||||||
registry.url = "docker.somewhere.io";
|
registry.url = "docker.somewhere.io";
|
||||||
images.example.image = pkgs.callPackage ./image.nix {};
|
images.example.image = pkgs.callPackage ./image.nix {};
|
||||||
};
|
};
|
||||||
kubernetes.resources.pods.example.spec.containers = {
|
kubernetes.resources.pods.example.spec.containers = {
|
||||||
custom.image = config.docker.images.example.path;
|
custom.image = config.docker.images.example.path;
|
||||||
|
|
|
||||||
11
flake.nix
11
flake.nix
|
|
@ -147,12 +147,11 @@
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
options =
|
options =
|
||||||
(self.evalModules.${system} {
|
(self.evalModules.${system} {
|
||||||
modules =
|
modules = builtins.attrValues (builtins.removeAttrs
|
||||||
builtins.attrValues (builtins.removeAttrs
|
# the submodules module currently doesn't evaluate:
|
||||||
# the submodules module currently doesn't evaluate:
|
# error: No module found ‹name›/latest
|
||||||
# error: No module found ‹name›/latest
|
# not sure how important that documentation is a this time
|
||||||
# not sure how important that documentation is a this time
|
self.nixosModules.kubenix ["submodule" "submodules"]);
|
||||||
self.nixosModules.kubenix ["submodule" "submodules"]);
|
|
||||||
})
|
})
|
||||||
.options;
|
.options;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,19 @@ in {
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
description = "Desired docker image name";
|
description = "Desired docker image name";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = if config.image != null then builtins.unsafeDiscardStringContext config.image.imageName else "";
|
default =
|
||||||
|
if config.image != null
|
||||||
|
then builtins.unsafeDiscardStringContext config.image.imageName
|
||||||
|
else "";
|
||||||
};
|
};
|
||||||
|
|
||||||
tag = mkOption {
|
tag = mkOption {
|
||||||
description = "Desired docker image tag";
|
description = "Desired docker image tag";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = if config.image != null then builtins.unsafeDiscardStringContext config.image.imageTag else "";
|
default =
|
||||||
|
if config.image != null
|
||||||
|
then builtins.unsafeDiscardStringContext config.image.imageTag
|
||||||
|
else "";
|
||||||
};
|
};
|
||||||
|
|
||||||
registry = mkOption {
|
registry = mkOption {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue