vim: add package option
This adds a readonly package option which will be set to the resulting configured vim package, so it can be refered to by other configuration. An example would be home.sessionVariables.EDITOR = config.programs.vim.package + "/bin/vim".
This commit is contained in:
parent
de5f902487
commit
e4deffcbe8
|
@ -46,6 +46,12 @@ in
|
|||
'';
|
||||
description = "Custom .vimrc lines";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
description = "Resulting customized vim package";
|
||||
readOnly = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -71,7 +77,8 @@ in
|
|||
};
|
||||
|
||||
in mkIf cfg.enable {
|
||||
home.packages = [ vim ];
|
||||
programs.vim.package = vim;
|
||||
home.packages = [ cfg.package ];
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue