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>
This commit is contained in:
Christina Sørensen 2024-04-05 13:27:22 +02:00
parent 2948912cde
commit d5851d5676
No known key found for this signature in database
GPG Key ID: 26C542FD97F965CE
2 changed files with 13 additions and 3 deletions

View File

@ -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 {

View File

@ -3,7 +3,7 @@
import ./make-test-python.nix ({ pkgs, ...} : {
name = "docker-registry";
meta = with pkgs.lib.maintainers; {
maintainers = [ globin ironpinguin ];
maintainers = [ globin ironpinguin cafkafk ];
};
nodes = {