Compare commits

...

2 Commits

3 changed files with 55 additions and 25 deletions

View File

@ -933,6 +933,32 @@ local inlay_hint_tsjs = {
includeInlayVariableTypeHints = true, includeInlayVariableTypeHints = true,
}; };
local setup = {
["nil_ls"] = function()
require('lspconfig').nil_ls.setup {
on_attach = on_attach,
capabilities = capabilities,
--- refer to https://github.com/oxalica/nil/blob/main/docs/configuration.md
--- for the list of configurations available for `nil_ls`
settings = {
["nil"] = {
formatting = {
command = { "nix", "run", "nixpkgs#alejandra" },
},
nix = {
flake = {
-- calls `nix flake archive` to put a flake and its output to store
autoArchive = true,
-- auto eval flake inputs for improved completion
autoEvalInputs = true,
},
},
},
},
}
end,
}
require('mason-lspconfig').setup_handlers({ require('mason-lspconfig').setup_handlers({
-- default handler -- default handler
function(server_name) function(server_name)
@ -1039,32 +1065,9 @@ require('mason-lspconfig').setup_handlers({
}, },
} }
end, end,
["nil_ls"] = function()
require('lspconfig').nil_ls.setup {
on_attach = on_attach,
capabilities = capabilities,
--- refer to https://github.com/oxalica/nil/blob/main/docs/configuration.md
--- for the list of configurations available for `nil_ls`
settings = {
["nil"] = {
formatting = {
command = { "nix", "run", "nixpkgs#alejandra" },
},
nix = {
flake = {
-- calls `nix flake archive` to put a flake and its output to store
autoArchive = true,
-- auto eval flake inputs for improved completion
autoEvalInputs = true,
},
},
},
},
}
end,
}) })
require('lspconfig')["nil_ls"].setup {} setup["nil_ls"]()
require("rust-tools").setup { require("rust-tools").setup {
tools = { tools = {
-- rust-tools options -- rust-tools options

View File

@ -63,7 +63,7 @@ in {
base-modules base-modules
++ [ ++ [
home-profiles.nerd_font_module home-profiles.nerd_font_module
home-profiles.git-htran home-profiles.git-pegasust
home-profiles.dev-packages home-profiles.dev-packages
home-profiles.zk home-profiles.zk
home-modules.darwin-spotlight home-modules.darwin-spotlight

27
nix/repo/nixConfig.nix Normal file
View File

@ -0,0 +1,27 @@
{inputs, cell}: let
# decorator for now, for data collecting :)
nix-conf = a: a;
in {
"htran@mbp" = nix-conf ''
accept-flake-config = true
experimental-features = nix-command flakes
post-build-hook = /etc/nix/upload-to-cache.sh
trusted-users = root htran hungtran hwtr
max-jobs = 8
cores = 12
# default is true for Linux, false for every one else
# https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-sandbox
sandbox = true
'';
"hungtran@mba-m2" = nix-conf ''
accept-flake-config = true
experimental-features = nix-command flakes
post-build-hook = /etc/nix/upload-to-cache.sh
trusted-users = root htran hungtran hwtr
max-jobs = 7
cores = 8
# default is true for Linux, false for every one else
# https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-sandbox
sandbox = true
'';
}