mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
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
1 changed files with 8 additions and 1 deletions
|
@ -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