Skip to content

Commit

Permalink
Apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
totoroot committed Mar 5, 2024
1 parent 3836eb8 commit 5b5e8e0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
2 changes: 0 additions & 2 deletions examples/python-directory/devenv.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---

inputs:
nixpkgs:
url: github:NixOS/nixpkgs/nixpkgs-unstable
Expand Down
2 changes: 0 additions & 2 deletions examples/python-poetry/devenv.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---

inputs:
nixpkgs:
url: github:NixOS/nixpkgs/nixpkgs-unstable
Expand Down
19 changes: 11 additions & 8 deletions src/modules/languages/python.nix
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@ in
example = "3.11 or 3.11.2";
};

directory = lib.mkOption {
type = lib.types.str;
default = config.devenv.root;
defaultText = lib.literalExpression "config.devenv.root";
description = ''
The Python project's root directory. Defaults to the root of the devenv project.
Can be an absolute path or one relative to the root of the devenv project.
'';
example = "./directory";
};

venv.enable = lib.mkEnableOption "Python virtual environment";

venv.requirements = lib.mkOption {
Expand All @@ -135,14 +146,6 @@ in
description = "Whether `pip install` should avoid outputting messages during devenv initialisation.";
};

directory = lib.mkOption {
type = lib.types.str;
default = config.devenv.root;
description = ''
The Python project's root directory. Defaults to the root of the devenv project.
'';
};

poetry = {
enable = lib.mkEnableOption "poetry";
install = {
Expand Down

0 comments on commit 5b5e8e0

Please sign in to comment.