Skip to content

Commit 46b628e

Browse files
committed
Init default template
1 parent bc48d59 commit 46b628e

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

flake.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
"stackptr.cachix.org-1:5e2q7OxdRdAtvRmHTeogpgJKzQhbvFqNMmCMw71opZA="
2424
];
2525
};
26+
templates.default = {
27+
path = ./templates/default;
28+
description = "Flake template with preferred formatter and libs";
29+
};
2630
};
2731
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
2832
perSystem = {

templates/default/flake.nix

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
4+
flake-parts = {
5+
url = "github:hercules-ci/flake-parts";
6+
inputs.nixpkgs-lib.follows = "nixpkgs";
7+
};
8+
};
9+
10+
outputs = inputs @ {flake-parts, ...}:
11+
flake-parts.lib.mkFlake {inherit inputs;} (top @ {
12+
config,
13+
withSystem,
14+
moduleWithSystem,
15+
...
16+
}: {
17+
flake = {
18+
nixConfig = {
19+
experimental-features = ["nix-command" "flakes"];
20+
extra-substituters = [
21+
"https://stackptr.cachix.org"
22+
];
23+
extra-trusted-public-keys = [
24+
"stackptr.cachix.org-1:5e2q7OxdRdAtvRmHTeogpgJKzQhbvFqNMmCMw71opZA="
25+
];
26+
};
27+
};
28+
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
29+
perSystem = {pkgs, ...}: {
30+
devShells.default = pkgs.mkShell {packages = [pkgs.just];};
31+
formatter = pkgs.alejandra;
32+
};
33+
});
34+
}

0 commit comments

Comments
 (0)