From 94db50bc5348012157e99f8f39cac5ead77caebf Mon Sep 17 00:00:00 2001 From: Eveeifyeve <88671402+Eveeifyeve@users.noreply.github.com> Date: Wed, 1 Jan 2025 22:54:28 +1100 Subject: [PATCH 1/2] feat: nix module system template --- snippets/nix.json | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/snippets/nix.json b/snippets/nix.json index 8cb7cce2..5ecad3be 100644 --- a/snippets/nix.json +++ b/snippets/nix.json @@ -103,5 +103,24 @@ "prefix": "inherit", "body": ["inherit $1;"], "description": "inherit expression" - } + }, + "module": { + "prefix": "module"; + "body": [ + "{lib, pkgs, config}: ", + "", + "imports = [", + " $1", + "];", + "", + "options = {", + " $2", + "};", + "", + "config = {", + " $3", + "};" + ], + "description": "Nix module system template", + }, } From 983e586ed193da084f39a7b89f455b3bf699f4f0 Mon Sep 17 00:00:00 2001 From: Eveeifyeve <88671402+Eveeifyeve@users.noreply.github.com> Date: Sun, 5 Jan 2025 21:21:49 +1100 Subject: [PATCH 2/2] fix(nix): snippet to include brackets --- snippets/nix.json | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/snippets/nix.json b/snippets/nix.json index 5ecad3be..20d802a4 100644 --- a/snippets/nix.json +++ b/snippets/nix.json @@ -107,18 +107,19 @@ "module": { "prefix": "module"; "body": [ - "{lib, pkgs, config}: ", + "{lib, pkgs, config}: {", "", - "imports = [", + " imports = [", " $1", - "];", + " ];", "", - "options = {", + " options = {", " $2", - "};", + " };", "", - "config = {", + " config = {", " $3", + " };", "};" ], "description": "Nix module system template",