36 lines
729 B
Nix
36 lines
729 B
Nix
{
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
lib.optionalAttrs (lib.elem "nvim::lsp::ansible" config.machine.services) {
|
|
ansiblels = {
|
|
cmd = [
|
|
"${pkgs.ansible-language-server}/bin/ansible-language-server"
|
|
"--stdio"
|
|
];
|
|
filetypes = [
|
|
"yaml"
|
|
"yaml.ansible"
|
|
"yml"
|
|
"yml.ansible"
|
|
];
|
|
settings = {
|
|
ansible = {
|
|
ansible.path = "${pkgs.ansible}/bin/ansible";
|
|
python = {
|
|
interpreterPath = "${config.machine.pkgsets.python3.pkgwrap}/bin/python";
|
|
};
|
|
validation = {
|
|
enabled = true;
|
|
lint = {
|
|
enabled = true;
|
|
path = "${pkgs.ansible-lint}/bin/ansible-lint";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|