nvim: move to services we do not specify a pkgset
This commit is contained in:
parent
465a6b19d1
commit
11b98d8146
45 changed files with 38 additions and 37 deletions
|
@ -1,46 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
lib.optionalAttrs (lib.elem "nvim::lsp::nix-nixd" config.machine.pkgs) {
|
||||
nixd = {
|
||||
cmd = [ "${pkgs.nixd}/bin/nixd" ];
|
||||
settings = {
|
||||
nixd = {
|
||||
on_init =
|
||||
_: # lua
|
||||
''
|
||||
function(client)
|
||||
local path = client.workspace_folders[1].name
|
||||
|
||||
if path == '/path/to/project1' then
|
||||
client.config.settings["rust-analyzer"].checkOnSave.overrideCommand = { "cargo", "check" }
|
||||
client.notify("workspace/didChangeConfiguration", { settings = client.config.settings })
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
'';
|
||||
nixpkgs = {
|
||||
expr = ''import (builtins.getFlake ("git+file:///etc/nixos")).inputs.nixpkgs {}'';
|
||||
};
|
||||
formatting = {
|
||||
command = [ "${pkgs.nixfmt-rfc-style}/bin/nixfmt" ];
|
||||
};
|
||||
options = {
|
||||
nixos = {
|
||||
expr = ''(builtins.getFlake ("git+file:///etc/nixos")).outputs.nixosConfigurations.Lilim.options'';
|
||||
};
|
||||
# TODO: Find a good general expression for this.
|
||||
# home_manager = {
|
||||
# expr =
|
||||
# "'(builtins.getFlake (\"git+file://\" + toString ./.)).homeConfigurations.\"ruixi@k-on\".options'";
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue