Improve nixd config

This commit is contained in:
Tyler Beckman 2024-11-24 21:38:00 -07:00
parent ec92f3bc5f
commit 89eb86d89e
Signed by: Ty
GPG key ID: 2813440C772555A4
2 changed files with 22 additions and 1 deletions

View file

@ -46,6 +46,26 @@
# Nix
"nix.enableLanguageServer" = true;
"nix.serverPath" = "nixd";
"nix.serverSettings" = {
nixd = {
formatting = {
command = [ "nixfmt" ];
};
nixpkgs = {
expr = ''import (builtins.getFlake "/etc/nixos").inputs.nixpkgs { }'';
};
options = {
nixos = {
expr = ''(builtins.getFlake "/etc/nixos").nixosConfigurations.ty-nixos.options'';
};
home-manager = {
expr = ''(builtins.getFlake "/etc/nixos").homeConfigurations."ty".options'';
};
};
};
};
};
};
}

View file

@ -1,4 +1,4 @@
{ ... }:
{ inputs, ... }:
{
imports = [
./hardware-configuration.nix
@ -8,4 +8,5 @@
system.stateVersion = "24.05";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
}