From 15d94f3058961528bff708a3a5e5eb3ff468fe01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Reynier?= Date: Thu, 1 Dec 2022 17:11:46 +0100 Subject: [PATCH] pet: don't create file without snippets --- modules/programs/pet.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/programs/pet.nix b/modules/programs/pet.nix index e75b10df3..48e972aec 100644 --- a/modules/programs/pet.nix +++ b/modules/programs/pet.nix @@ -99,8 +99,9 @@ in { else { General = cfg.settings; }); - "pet/snippet.toml".source = - format.generate "snippet.toml" { snippets = cfg.snippets; }; + "pet/snippet.toml" = mkIf (cfg.snippets != [ ]) { + source = format.generate "snippet.toml" { snippets = cfg.snippets; }; + }; }; }; }