nix: Allow definition of further toml values

This commit is contained in:
DashieTM 2024-05-31 14:22:19 +02:00
parent 40beca475f
commit 073e88ab4f

View file

@ -34,8 +34,7 @@ in
}; };
plugin_config = mkOption { plugin_config = mkOption {
# TODO: define type type = with types; nullOr (listOf pkgs.formats.toml);
# type = with types; nullOr (listOf toml);
default = { }; default = { };
description = mdDoc '' description = mdDoc ''
Toml values passed to the configuration for plugins to use. Toml values passed to the configuration for plugins to use.
@ -65,10 +64,10 @@ in
lib.mkIf cfg.enable { lib.mkIf cfg.enable {
home.packages = lib.optional (cfg.package != null) cfg.package; home.packages = lib.optional (cfg.package != null) cfg.package;
xdg.configFile."reset/ReSet.toml".source = (pkgs.formats.toml { }).generate "reset" xdg.configFile."reset/ReSet.toml".source = (pkgs.formats.toml cfg.config.plugin_config).generate "reset"
{ {
plugins = fetchedPlugins; plugins = fetchedPlugins;
plugin_path = path; plugin_path = path;
}; #++ (pkgs.formats.toml cfg.config.plugin_config); };
}; };
} }