From d73191e526bed21e96913d653acbf823581cb702 Mon Sep 17 00:00:00 2001 From: willifan Date: Sun, 5 Jan 2025 00:23:52 +0100 Subject: [PATCH] configured nixd --- modules/default/common/default.nix | 8 ++++++-- modules/default/common/nixvim/lsp.nix | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/default/common/default.nix b/modules/default/common/default.nix index 6b04eb3..88060b6 100644 --- a/modules/default/common/default.nix +++ b/modules/default/common/default.nix @@ -1,4 +1,4 @@ -{ lib, config, hostname, ... }: +{ lib, config, inputs, hostname, ... }: { @@ -29,8 +29,12 @@ networkmanager.enable = true; hostName = "${hostname}"; }; + console.keyMap = "en"; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix = { + settings.experimental-features = [ "nix-command" "flakes" ]; + nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; + }; nixpkgs.config.allowUnfree = true; system.stateVersion = "23.11"; } diff --git a/modules/default/common/nixvim/lsp.nix b/modules/default/common/nixvim/lsp.nix index b81f56f..e2a48c9 100644 --- a/modules/default/common/nixvim/lsp.nix +++ b/modules/default/common/nixvim/lsp.nix @@ -16,6 +16,11 @@ lua_ls = {enable = true;}; nixd = { enable = true; + + settings = { + formatting.command = [ "nixpkgs-fmt" ]; + nixpkgs.expr = "import {}"; + }; }; pyright = {enable = true;}; gopls = {enable = true;};