Collection of nix flake templates

Initial Commit

Collection of development environments based on the language im
working with.

yemou.pink 7abb17ad

verified
Changed files
+112
default
erlang
python
+15
default/flake.nix
···
+
{
+
description = "TODO: Describe the flake";
+
+
inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
+
+
outputs =
+
{ self, nixpkgs }:
+
let
+
systems = [ "x86_64-linux" ];
+
forSystems = func: nixpkgs.lib.genAttrs systems (system: func (import nixpkgs { inherit system; }));
+
in
+
{
+
formatter = forSystems (pkgs: pkgs.nixfmt-tree.override { settings.formatter.nixfmt.options = [ "-w 120" ]; });
+
};
+
}
+28
erlang/flake.nix
···
+
{
+
description = "TODO: Describe the erlang flake";
+
+
inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
+
+
outputs =
+
{ self, nixpkgs }:
+
let
+
systems = [ "x86_64-linux" ];
+
forSystems = func: nixpkgs.lib.genAttrs systems (system: func (import nixpkgs { inherit system; }));
+
in
+
{
+
formatter = forSystems (pkgs: pkgs.nixfmt-tree.override { settings.formatter.nixfmt.options = [ "-w 120" ]; });
+
+
devShells = forSystems (pkgs: {
+
default = pkgs.mkShellNoCC {
+
buildInputs = with pkgs; [
+
(with beamMinimalPackages; [
+
erlang
+
erlang-ls
+
erlfmt
+
rebar3
+
])
+
];
+
};
+
});
+
};
+
}
+30
flake.nix
···
+
{
+
description = "yemou's nix flake templates";
+
+
outputs =
+
{ self, nixpkgs }:
+
let
+
systems = [ "x86_64-linux" ];
+
forSystems = func: nixpkgs.lib.genAttrs systems (system: func (import nixpkgs { inherit system; }));
+
in
+
{
+
formatter = forSystems (pkgs: pkgs.nixfmt-tree.override { settings.formatter.nixfmt.options = [ "-w 120" ]; });
+
+
templates = {
+
default = {
+
path = ./default;
+
description = "Generic nix flake";
+
};
+
erlang = {
+
path = ./erlang;
+
description = "Erlang nix flake";
+
};
+
python = {
+
path = ./python;
+
description = "Python nix flake";
+
};
+
};
+
+
defaultTemplate = self.templates.default;
+
};
+
}
+12
license
···
+
Copyright (C) 2025, yemou <dev@mou.pink>
+
+
Permission to use, copy, modify, and/or distribute this software for any purpose
+
with or without fee is hereby granted.
+
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+
THIS SOFTWARE.
+25
python/flake.nix
···
+
{
+
description = "TODO: Describe the python flake";
+
+
inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
+
+
outputs =
+
{ self, nixpkgs }:
+
let
+
systems = [ "x86_64-linux" ];
+
forSystems = func: nixpkgs.lib.genAttrs systems (system: func (import nixpkgs { inherit system; }));
+
in
+
{
+
formatter = forSystems (pkgs: pkgs.nixfmt-tree.override { settings.formatter.nixfmt.options = [ "-w 120" ]; });
+
+
devShells = forSystems (pkgs: {
+
default = pkgs.mkShellNoCC {
+
buildInputs = with pkgs; [
+
(python3.withPackages (pypkgs: with pypkgs; [ ]))
+
ruff
+
ty
+
];
+
};
+
});
+
};
+
}
+2
readme.md
···
+
# seed
+
nix flake templates