Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix more defaults and examples #1530

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/modules/containers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ let
type = types.either types.path (types.listOf types.path);
description = "Add a path to the container. Defaults to the whole git repo.";
default = self;
defaultText = "self";
defaultText = lib.literalExpression "self";
};

startupCommand = lib.mkOption {
Expand Down
10 changes: 5 additions & 5 deletions src/modules/integrations/android.nix
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,11 @@ in
android-studio.package = lib.mkOption {
type = lib.types.package;
default = pkgs.android-studio;
defaultText = "pkgs.android-studio";
defaultText = lib.literalExpression "pkgs.android-studio";
description = ''
The Android Studio package to use.
By default, the Android Studio package from nixpkgs is used.
'';
example = "pkgs.android-studio";
};

flutter.enable = lib.mkOption {
Expand All @@ -236,12 +235,11 @@ in
flutter.package = lib.mkOption {
type = lib.types.package;
default = pkgs.flutter;
defaultText = "pkgs.flutter";
defaultText = lib.literalExpression "pkgs.flutter";
description = ''
The Flutter package to use.
By default, the Flutter package from nixpkgs is used.
'';
example = "pkgs.flutter";
};

reactNative.enable = lib.mkOption {
Expand All @@ -258,7 +256,9 @@ in
androidSdk
platformTools
androidEmulator
] ++ (lib.optional cfg.flutter.enable cfg.flutter.package) ++ (lib.optional cfg.android-studio.enable cfg.android-studio.package);
]
++ lib.optional cfg.flutter.enable cfg.flutter.package
++ lib.optional cfg.android-studio.enable cfg.android-studio.package;

# Nested conditional for flutter
languages = lib.mkMerge [
Expand Down
6 changes: 3 additions & 3 deletions src/modules/languages/idris.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ in {
package = lib.mkOption {
type = lib.types.package;
default = pkgs.idris2;
defaultText = "pkgs.idris2";
defaultText = lib.literalExpression "pkgs.idris2";
description = ''
The Idris package to use.
'';
example = "pkgs.idris";
example = lib.literalExpression "pkgs.idris";
};
};

config = lib.mkIf cfg.enable {
packages = with pkgs; [
packages = [
cfg.package
];
};
Expand Down
2 changes: 1 addition & 1 deletion src/modules/languages/java.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ in
enable = mkEnableOption "maven";
package = mkOption {
type = types.package;
defaultText = "pkgs.maven.override { jdk_headless = cfg.jdk.package; }";
defaultText = literalExpression "pkgs.maven.override { jdk_headless = cfg.jdk.package; }";
description = ''
The Maven package to use.
The Maven package by default inherits the JDK from `languages.java.jdk.package`.
Expand Down
2 changes: 1 addition & 1 deletion src/modules/languages/lean4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ in {
package = lib.mkOption {
type = lib.types.package;
default = pkgs.lean4;
defaultText = "pkgs.lean4";
defaultText = lib.literalExpression "pkgs.lean4";
description = ''
The lean4 package to use.
'';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/languages/scala.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ in
package = lib.mkOption {
type = lib.types.package;
default = pkgs.scala_3;
defaultText = "pkgs.scala_3";
defaultText = lib.literalExpression "pkgs.scala_3";
description = ''
The Scala package to use.
'';
Expand Down
8 changes: 4 additions & 4 deletions src/modules/languages/standardml.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ in
package = lib.mkOption {
type = lib.types.package;
default = pkgs.mlton;
defaultText = "pkgs.mlton";
defaultText = lib.literalExpression "pkgs.mlton";
description = ''
The Standard ML package to use.
'';
};
};

config = lib.mkIf cfg.enable {
packages = with pkgs; [
packages = [
cfg.package
millet
smlfmt
pkgs.millet
pkgs.smlfmt
];
};
}
4 changes: 2 additions & 2 deletions src/modules/languages/swift.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ in
package = lib.mkOption {
type = lib.types.package;
default = pkgs.swift;
defaultText = "pkgs.swift";
defaultText = lib.literalExpression "pkgs.swift";
description = ''
The Swift package to use.
'';
};
};

config = lib.mkIf cfg.enable {
packages = with pkgs; [
packages = [
cfg.package
pkgs.clang
];
Expand Down
2 changes: 1 addition & 1 deletion src/modules/services/cockroachdb.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ in

package = lib.mkOption {
default = pkgs.cockroachdb-bin;
defaultText = "pkgs.cockroachdb-bin";
defaultText = lib.literalExpression "pkgs.cockroachdb-bin";
description = "The CockroachDB package to use.";
};
};
Expand Down
2 changes: 1 addition & 1 deletion src/modules/services/nginx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ in
package = lib.mkOption {
type = lib.types.package;
default = pkgs.nginx;
defaultText = "pkgs.nginx";
defaultText = lib.literalExpression "pkgs.nginx";
description = "The nginx package to use.";
};

Expand Down
Loading