From 81239e3da530e7e3463f29dc7dcccaee6ad6eeed Mon Sep 17 00:00:00 2001 From: Marc 'risson' Schmitt Date: Sun, 16 Apr 2023 00:01:41 +0200 Subject: [PATCH] lib: modules: zsh: add default value for file option Signed-off-by: Marc 'risson' Schmitt --- lib/modules/zsh.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/modules/zsh.nix b/lib/modules/zsh.nix index 11105f1..cf43867 100644 --- a/lib/modules/zsh.nix +++ b/lib/modules/zsh.nix @@ -5,6 +5,7 @@ let inherit (nixpkgs) lib; inherit (lib) + mkDefault mkEnableOption mkOption types @@ -13,7 +14,7 @@ let in { # TODO: Bring this from home-manager! - pluginModule = with types; submodule { + pluginModule = with types; submodule ({ config, ... }: { options = { src = mkOption { type = path; @@ -37,5 +38,7 @@ in description = "The plugin script to source."; }; }; - }; + + config.file = mkDefault "${config.name}.plugin.zsh"; + }); }