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 (
{ 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;
};