From fbec55367fda331120416d6ceb99b376d92eb0f9 Mon Sep 17 00:00:00 2001 From: Quentin Smith Date: Fri, 16 Feb 2024 19:27:07 -0500 Subject: [PATCH] modules/sops/templates: Support custom files as secret templates This exposes the `file` option, which can be used with `pkgs.formats` to write additional configuration formats. --- modules/sops/templates/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/sops/templates/default.nix b/modules/sops/templates/default.nix index 750a531..43f1baf 100644 --- a/modules/sops/templates/default.nix +++ b/modules/sops/templates/default.nix @@ -56,8 +56,10 @@ in { file = mkOption { type = types.path; default = pkgs.writeText config.name config.content; - visible = false; - readOnly = true; + defaultText = ''pkgs.writeText config.name config.content''; + description = '' + File used as the template. + ''; }; }; }));