Make option names more clear

This commit is contained in:
Manuel Thalmann 2024-08-23 19:42:27 +02:00
parent 1cae378395
commit 02084c159d

View file

@ -8,7 +8,7 @@
themeType = types.submodule (
{ config, ... }: {
options = {
path = mkOption {
source = mkOption {
type = types.nullOr types.path;
description = "The path to the oh-my-posh theme to use.";
default = null;
@ -17,9 +17,9 @@
name = mkOption {
type = types.nullOr types.str;
description = "The name of the theme.";
default = if (config.path != null)
default = if (config.source != null)
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
null;
};