Make option names more clear

This commit is contained in:
Manuel Thalmann 2024-08-23 19:42:27 +02:00
parent 689e55b6d7
commit 4c6f9d8dbf

View file

@ -8,7 +8,7 @@
themeType = types.submodule ( themeType = types.submodule (
{ config, ... }: { { config, ... }: {
options = { options = {
path = mkOption { source = mkOption {
type = types.nullOr types.path; type = types.nullOr types.path;
description = "The path to the oh-my-posh theme to use."; description = "The path to the oh-my-posh theme to use.";
default = null; default = null;
@ -17,9 +17,9 @@
name = mkOption { name = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
description = "The name of the theme."; description = "The name of the theme.";
default = if (config.path != null) default = if (config.source != null)
then then
lib.strings.removeSuffix ".omp" (lib.strings.removeSuffix ".json" (builtins.baseNameOf config.path)) lib.strings.removeSuffix ".omp" (lib.strings.removeSuffix ".json" (builtins.baseNameOf config.source))
else else
null; null;
}; };