This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
93 lines (82 loc) · 2.29 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
description = "Templates for Nix environments";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
utils = {
url = "github:numtide/flake-utils";
};
poetry2nix = {
url = "github:nix-community/poetry2nix";
};
};
outputs = {
nixpkgs,
utils,
self,
poetry2nix,
...
}:
utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
overlays = [poetry2nix.overlays.default];
};
poetryEnv = pkgs.poetry2nix.mkPoetryEnv {
projectDir = ./.;
};
in {
devShell = with pkgs;
mkShell {
buildInputs = [poetryEnv poetry];
# https://github.com/pre-commit/pre-commit/issues/432
shellHook = ''
export SKIP=terraform_fmt,terragrunt_fmt,check-renovate
pre-commit install --install-hooks
'';
};
templates = {
pe = {
path = ./pe;
description = "Platform Engineering environment";
welcomeText = ''
# SilverRailTech Platform Engineering Environment
## Inclusions
- Pre-commit hooks
- Nix flake development environment
- Python + Poetry project
- Git attributes
- Git ignore
- Direnv activation file
glhf
'';
};
dotnet = {
path = ./dotnet;
description = "Dotnet SWEng environment";
welcomeText = ''
# SilverRailTech Dotnet Software Engineering
## When the best is not enough, you call us
- Pre-commit hooks
- Nix flake development environment
- Git ignore
- Direnv activation file
Now give 'em hell marine
'';
};
ruby = {
path = ./ruby;
description = "Ruby environment";
welcomeText = ''
# SilverRailTech Ruby
## Shine bright like a gem
- Pre-commit hooks
- Nix flake development environment
- Git ignore
- Direnv activation file
'';
};
};
}
);
}