mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
feat: make propagation independent of submodules
This commit is contained in:
parent
bdc145e2bb
commit
7afbc91301
4 changed files with 82 additions and 39 deletions
|
|
@ -5,6 +5,8 @@ with lib;
|
|||
let
|
||||
cfg = config.docker;
|
||||
in {
|
||||
imports = [ ./base.nix ];
|
||||
|
||||
options.docker = {
|
||||
registry.url = mkOption {
|
||||
description = "Default registry url where images are published";
|
||||
|
|
@ -70,13 +72,16 @@ in {
|
|||
};
|
||||
|
||||
config = {
|
||||
# define docker feature
|
||||
_module.features = ["docker"];
|
||||
|
||||
# pass docker library as param
|
||||
_module.args.docker = import ../lib/docker.nix { inherit lib pkgs; };
|
||||
|
||||
submodules.defaults = [{
|
||||
# propagate docker options if docker feature is enabled
|
||||
_module.propagate = [{
|
||||
features = [ "docker" ];
|
||||
default = { config, name, ... }: {
|
||||
module = { config, name, ... }: {
|
||||
# propagate registry options
|
||||
docker.registry = cfg.registry;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue