Skip to content

Commit

Permalink
Experiment with adding a hidden field to settings items
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Sep 23, 2024
1 parent b828e3e commit 4946ab8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/base/nixos-options-to-settings-schema.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ let
}
// lib.optionalAttrs (lib.hasAttr "default" v) { defaultValue = convertDefaultValue v.default; }
// lib.optionalAttrs (lib.hasAttr "description" v && builtins.typeOf v.description == "string") { inherit (v) description; }
// lib.optionalAttrs (lib.hasAttr "visible" v && v.visible == false) { hidden = true; }
;

evalString = str: builtins.scopedImport {} (builtins.toFile "expr.nix" str);
Expand Down
2 changes: 2 additions & 0 deletions modules/languages/python/module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ with lib;
let
mkOptions = packageOption: {
enable = mkOption {
description = "Enable Python 3 kernel";
type = types.bool;
default = false;
visible = false;
};

packages = mkOption {
Expand Down

0 comments on commit 4946ab8

Please sign in to comment.