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.
This commit is contained in:
Silvan Mosberger 2017-09-17 17:27:26 +02:00
parent de5f902487
commit afe73fe5b5
No known key found for this signature in database
GPG key ID: 9424360B4B85C9E7

View file

@ -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 ];
}
);
}