From 49d59cfa9f4275fe4dd055fb35e5f0d69c62944d Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Wed, 22 Oct 2025 13:38:07 -0400 Subject: [PATCH] feat: update Nix flake file template --- snippets/nix-mode/__flake.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/snippets/nix-mode/__flake.nix b/snippets/nix-mode/__flake.nix index 3d09ea7..8369463 100644 --- a/snippets/nix-mode/__flake.nix +++ b/snippets/nix-mode/__flake.nix @@ -8,10 +8,14 @@ inputs = { ${2:nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - }${3:flake-utils.url = "github:numtide/flake-utils"; - }$4 + systems.url = "github:nix-systems/default";} }; - outputs = { $5 }: - $0 + outputs = { self, ${3:nixpkgs, systems, }... }: + ${3:$(when (and (string-match-p "nixpkgs[[:space:]]*," yas-text) + (string-match-p "systems[[:space:]]*," yas-text)) "let + eachSystem = nixpkgs.lib.genAttrs (import systems); + in ")}{ + $0 + }; }