forked from ALT-F4-LLC/kickstart.nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
175 lines (149 loc) · 5.33 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
{
description = "Kickstart templates to get started building with Nix.";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = inputs @ {
flake-parts,
self,
...
}: let
lib = import ./lib {inherit inputs;};
in
flake-parts.lib.mkFlake {inherit inputs;} {
flake = {
templates = {
bash = {
description = "Kickstart Bash language module flake.";
path = ./template/bash;
};
cpp-cmake = {
description = "Kickstart C++ CMake project flake.";
path = ./template/cpp-cmake;
};
dart = {
description = "Kickstart Dart package flake.";
path = ./template/dart;
};
darwin = {
description = "Kickstart macOS development environment flake.";
path = ./template/darwin;
};
go-mod = {
description = "Kickstart Go language module flake.";
path = ./template/go-mod;
};
go-pkg = {
description = "Kickstart Go language package flake.";
path = ./template/go-pkg;
};
haskell = {
description = "Kickstart Haskell package flake.";
path = ./template/haskell;
};
home-manager = {
description = "Kickstart Home Manager environment flake.";
path = ./template/home-manager;
};
lua-app = {
description = "Kickstart Lua application flake.";
path = ./template/lua-app;
};
nestjs = {
description = "Kickstart NestJS application flake.";
path = ./template/nestjs;
};
nixos-desktop = {
description = "Kickstart NixOS desktop environment flake.";
path = ./template/nixos-desktop;
};
nixos-minimal = {
description = "Kickstart NixOS minimal environment flake.";
path = ./template/nixos-minimal;
};
nodejs-backend = {
description = "Kickstart Node.js backend package flake.";
path = ./template/nodejs-backend;
};
ocaml = {
description = "Kickstart OCaml package flake.";
path = ./template/ocaml;
};
powershell = {
description = "Kickstart Powershell application flake.";
path = ./template/powershell;
};
python-app = {
description = "Kickstart Python application flake.";
path = ./template/python-app;
};
python-pkg = {
description = "Kickstart Python package flake.";
path = ./template/python-pkg;
};
rust = {
description = "Kickstart Rust package flake.";
path = ./template/rust;
};
swiftpm = {
description = "Kickstart Swift package flake.";
path = ./template/swiftpm;
};
vite-react = {
description = "Kickstart Vite React package flake.";
path = ./template/vite-react;
};
zig = {
description = "Kickstart Zig package flake.";
path = ./template/zig;
};
};
};
systems = ["aarch64-darwin" "aarch64-linux" "x86_64-linux" "x86_64-darwin"];
perSystem = {
config,
self',
inputs',
pkgs,
system,
...
}: let
inherit (pkgs) alejandra callPackage just jq mkShell;
in {
devShells = {
default = mkShell {
buildInputs = [just jq];
};
};
formatter = alejandra;
packages = let
mkDarwin = callPackage lib.flake.mkDarwin;
mkHomeManager = callPackage lib.flake.mkHomeManager;
mkLanguage = callPackage lib.flake.mkLanguage;
mkNixosDesktop = callPackage lib.flake.mkNixosDesktop;
mkNixosMinimal = callPackage lib.flake.mkNixosMinimal;
in {
example-bash = mkLanguage {name = "bash";};
example-cpp-cmake = mkLanguage {name = "cpp-cmake";};
example-dart = mkLanguage {name = "dart";};
example-darwin = mkDarwin {};
example-go-mod = mkLanguage {name = "go-mod";};
example-go-pkg = mkLanguage {name = "go-pkg";};
example-haskell = mkLanguage {name = "haskell";};
example-home-manager = mkHomeManager {};
example-lua-app = mkLanguage {name = "lua-app";};
example-nestjs = mkLanguage {name = "nestjs";};
example-nixos-desktop-gnome = mkNixosDesktop {desktop = "gnome";};
example-nixos-desktop-plasma5 = mkNixosDesktop {desktop = "plasma5";};
example-nixos-minimal = mkNixosMinimal {};
example-nodejs-backend = mkLanguage {name = "nodejs-backend";};
example-ocaml = mkLanguage {name = "ocaml";};
example-powershell = mkLanguage {name = "powershell";};
example-python-app = mkLanguage {name = "python-app";};
example-python-pkg = mkLanguage {name = "python-pkg";};
example-rust = mkLanguage {name = "rust";};
example-swiftpm = mkLanguage {name = "swiftpm";};
example-vite-react = mkLanguage {name = "vite-react";};
example-zig = mkLanguage {name = "zig";};
};
};
};
}