diff options
author | Soispha <soispha@vhack.eu> | 2023-05-27 16:49:13 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-05-27 16:49:13 +0200 |
commit | 826be31fa74fa5cd0badea00207512e4ab1d00e1 (patch) | |
tree | 99b3d4632c67bd4268b484fb0d5e5e65c8b446c2 /flake.nix | |
parent | Feat(shell): Init (diff) | |
download | flake-templates-826be31fa74fa5cd0badea00207512e4ab1d00e1.tar.gz flake-templates-826be31fa74fa5cd0badea00207512e4ab1d00e1.zip |
Fix(flake): Add the templates to the outputs
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 62 |
1 files changed, 51 insertions, 11 deletions
diff --git a/flake.nix b/flake.nix index dfb50da..6d63eb8 100644 --- a/flake.nix +++ b/flake.nix @@ -1,17 +1,57 @@ -# vim: ts=2 { - description = "A collection of nix flake templates for diffrent languages"; + description = "A collection of nix flake templates"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - outputs = {self}: { - templates.rust = { - path = ./rust; - description = "A simple Rust/Cargo project"; - welcomeText = ""; + flake-utils = { + url = "github:numtide/flake-utils"; + inputs = { + systems.follows = "systems"; + }; }; - templates.rustToolchain = { - path = ./rust/toolchain.nix; - description = "A simple Rust/Cargo project with a diffrent toolchain"; - welcomeText = ""; + + systems = { + url = "github:nix-systems/x86_64-linux"; # only evaluate for this system }; }; + + outputs = { + nixpkgs, + flake-utils, + ... + }: + flake-utils.lib.eachDefaultSystem (system: let + pkgs = nixpkgs.legacyPackages."${system}"; + in { + templates = { + rust = { + path = ./rust; + description = "A Rust/Crane project"; + welcomeText = "Please customize the text in the flake.nix and LICENSE.spdx files; Look at the TODO marks.\n Also run `git init`, `cargo init` and `cog install-hook commit-msg`"; + }; + awk = { + path = ./awk; + description = "An Awk project"; + welcomeText = "Please customize the text in the flake.nix and LICENSE.spdx files; Look at the TODO marks.\n Also run `git init` and `cog install-hook commit-msg`"; + }; + shell = { + path = ./shell; + description = "A Shell project"; + welcomeText = "Please customize the text in the flake.nix and LICENSE.spdx files; Look at the TODO marks.\n Also run `git init` and `cog install-hook commit-msg`"; + }; + }; + + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + nil + alejandra + statix + ltex-ls + cocogitto + ]; + }; + }); } +# vim: ts=2 + |