From fb0e5be84331188a69b3edd31679ca6576edb75a Mon Sep 17 00:00:00 2001 From: pennae Date: Sun, 5 Dec 2021 21:28:49 +0100 Subject: treewide: add defaultText for options with simple interpolation defaults adds defaultText for all options that use `cfg.*` values in their defaults, but only for interpolations with no extra processing (other than toString where necessary) --- nixos/modules/services/misc/etcd.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'nixos/modules/services/misc/etcd.nix') diff --git a/nixos/modules/services/misc/etcd.nix b/nixos/modules/services/misc/etcd.nix index fc6dfaa4285..88920d6a28e 100644 --- a/nixos/modules/services/misc/etcd.nix +++ b/nixos/modules/services/misc/etcd.nix @@ -50,6 +50,7 @@ in { initialCluster = mkOption { description = "Etcd initial cluster configuration for bootstrapping."; default = ["${cfg.name}=http://127.0.0.1:2380"]; + defaultText = literalExpression ''["''${config.${opt.name}}=http://127.0.0.1:2380"]''; type = types.listOf types.str; }; -- cgit 1.4.1