diff options
author | Christina Sørensen <christina@cafkafk.com> | 2024-04-05 13:27:22 +0200 |
---|---|---|
committer | Christina Sørensen <christina@cafkafk.com> | 2024-04-18 06:11:06 +0200 |
commit | d5851d56761da0750ade90bc4a693d414671b045 (patch) | |
tree | ba472b338c681e63fdcf1576b659215d8a8b47b5 /nixos/modules/services/misc | |
parent | 2948912cdede361087742c672ff921cd80ac9ec2 (diff) |
nixos/dockerRegistry: add `configFile` option
defaultText based on how nixos/modules/services/development/athens.nix
does it.
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Diffstat (limited to 'nixos/modules/services/misc')
-rw-r--r-- | nixos/modules/services/misc/docker-registry.nix | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/nixos/modules/services/misc/docker-registry.nix b/nixos/modules/services/misc/docker-registry.nix index a2764abd993e..93bf71ea3ecc 100644 --- a/nixos/modules/services/misc/docker-registry.nix +++ b/nixos/modules/services/misc/docker-registry.nix @@ -41,8 +41,7 @@ let }; }; - configFile = pkgs.writeText "docker-registry-config.yml" (builtins.toJSON (recursiveUpdate registryConfig cfg.extraConfig)); - + configFile = cfg.configFile; in { options.services.dockerRegistry = { enable = mkEnableOption "Docker Registry"; @@ -106,6 +105,17 @@ in { type = types.attrs; }; + configFile = lib.mkOption { + default = pkgs.writeText "docker-registry-config.yml" (builtins.toJSON (recursiveUpdate registryConfig cfg.extraConfig)); + defaultText = literalExpression ''pkgs.writeText "docker-registry-config.yml" "# my custom docker-registry-config.yml ..."''; + description = '' + Path to CNCF distribution config file. + + Setting this option will override any configuration applied by the extraConfig option. + ''; + type = types.path; + }; + enableGarbageCollect = mkEnableOption "garbage collect"; garbageCollectDates = mkOption { |