0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

treewide: set defaultText for options using simple path defaults

adds defaultText for all options that set their default to a path expression
using the ubiquitous `cfg` shortcut bindings.
This commit is contained in:
pennae 2021-12-05 20:40:24 +01:00
parent 70b105d1d0
commit e24a8775a8
21 changed files with 79 additions and 23 deletions

View file

@ -1,9 +1,10 @@
{ config, lib, pkgs, utils, ... }:
{ config, lib, options, pkgs, utils, ... }:
with lib;
let
cfg = config.services.gitlab;
opt = options.services.gitlab;
ruby = cfg.packages.gitlab.ruby;
@ -552,6 +553,7 @@ in {
defaultForProjects = mkOption {
type = types.bool;
default = cfg.registry.enable;
defaultText = literalExpression "config.${opt.registry.enable}";
description = "If GitLab container registry should be enabled by default for projects.";
};
issuer = mkOption {