-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
40 lines (37 loc) · 1.25 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
{
description = "Tooling for Homebridge iBricks";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
devenv.url = "github:cachix/devenv";
};
outputs = inputs @ {
self,
flake-parts,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
#flake = { }; # system-agnostic flake attributes
systems = ["x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux"];
imports = [inputs.devenv.flakeModule];
# Documentation of arguments: https://flake.parts/module-arguments.html
perSystem = {pkgs, ...}: {
# define development shells
devenv.shells.default = {config, ...}: {
packages = [ pkgs.google-cloud-sdk ];
languages.go = {
enable = true;
};
# project specific environment variables or commands/aliases
env.PROJECT_NAME = "Rain Detect";
scripts.hello.exec = ''
cat <<EOF
## Welcome to a devenv setup for '$PROJECT_NAME'
your repository is at DEVENV_ROOT [$DEVENV_ROOT]
nix dependencies are symlinked to $DEVENV_DOTFILE
available binaries: [$(cd $DEVENV_DOTFILE/profile/bin; echo *)]
EOF
'';
};
};
};
}