-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpython-vscode.nix
32 lines (31 loc) · 1 KB
/
python-vscode.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
topLevel@{ inputs, flake-parts-lib, ... }: {
imports = [
./devcontainer.nix
./vscode.nix
inputs.flake-parts.flakeModules.flakeModules
];
flake.flakeModules.pythonVscode = {
imports = [
topLevel.config.flake.flakeModules.devcontainer
topLevel.config.flake.flakeModules.vscode
];
options.perSystem = flake-parts-lib.mkPerSystemOption ({ config, pkgs, lib, system, ... }: {
ml-ops.devcontainer = {
nixago.requests = {
".vscode/settings.json".data = {
# Don't let VS Code activate the environment because it should has been activated by devenv already
"python.terminal.activateEnvironment" = false;
"[python]"."editor.defaultFormatter" = "ms-python.black-formatter";
};
".vscode/extensions.json".data = {
"recommendations" = [
"ms-python.black-formatter"
"ms-python.python"
];
};
};
};
# TODO: Other IDE settings
});
};
}