-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
68 lines (67 loc) · 1.83 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
{
inputs = {
javascript-nix.url = "github:nicknovitski/javascript-nix/v1";
make-shell.url = "github:nicknovitski/make-shell";
update-flake.url = "github:nicknovitski/update-flake";
gcloud-nix.url = "github:nicknovitski/gcloud-nix/v1";
};
outputs =
{
gcloud-nix,
javascript-nix,
make-shell,
update-flake,
...
}:
{
flakeModules.default =
{
inputs,
lib,
...
}:
{
imports = [
make-shell.flakeModules.default
update-flake.flakeModules.default
./flake-modules
];
# Default supported systems
systems = [
"aarch64-darwin" # Apple Silicon Laptops
"aarch64-linux" # Devcontainers
"x86_64-linux" # Cloud Services
];
perSystem =
{
pkgs,
system,
...
}:
{
# add expo options and defaults to all shells
make-shell.imports = [
gcloud-nix.shellModules.default
javascript-nix.shellModules.default
./shell-modules
];
# create update-flake package
update.enable = true;
# Permit installing certain packages with unfree software licenses
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
config = {
allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"graphite-cli"
"terraform"
];
};
};
# enable `nix fmt` command
formatter = pkgs.nixfmt-rfc-style;
};
};
};
}