-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodule.nix
More file actions
38 lines (36 loc) · 989 Bytes
/
module.nix
File metadata and controls
38 lines (36 loc) · 989 Bytes
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
{ config, lib, pkgs, types, ... }: {
imports = [
./features/vscode
./features/cypress.nix
./features/playwright.nix
./features/turborepo.nix
./languages/js.nix
./languages/rust.nix
];
options = {
packages = lib.mkOption {
type = types.listOf types.package;
description =
"A list of packages to expose inside the developer environment. Search available packages using ``devenv search NAME``.";
default = [ ];
};
env = lib.mkOption {
type = types.attrsOf types.str;
description = "Key value pairs for env. variables";
example = { FOO = "1"; };
default = { };
};
shell = lib.mkOption {
type = types.package;
internal = true;
};
};
config = {
shell = pkgs.mkShell {
buildInputs = config.packages;
shellHook = builtins.concatStringsSep "\n"
(lib.attrsets.mapAttrsToList (name: value: "export ${name}=${value}")
config.env);
};
};
}