From 084166f71bd902b64a5bec5abec1a3aacb94752e Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Thu, 24 Oct 2024 16:06:10 -0400 Subject: [PATCH] Setup nixd and better devshells --- flake.nix | 28 +++++++++++++++++------- system/with/user/with/program/nixvim.nix | 5 +++-- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index 6d41366..f701cee 100644 --- a/flake.nix +++ b/flake.nix @@ -45,12 +45,8 @@ outputs = { self, nixpkgs, - home-manager, - nixvim, agenix, nix-darwin, - d, - binwarden, treefmt-nix, ... } @ inputs: let @@ -107,11 +103,17 @@ pkgs = import nixpkgs {inherit system;}; in { default = pkgs.mkShell { - inputsFrom = with self.devShells.${system}; [formatting]; + inputsFrom = with self.devShells.${system}; [ + building + formatting + managing-secrets + ]; + }; + building = pkgs.mkShell { packages = [ - agenix.packages.${system}.default - #nix-darwin.packages.${system}.default - ]; + ] ++ pkgs.lib.optionals pkgs.stdenv.isDarwin [ + nix-darwin.packages.${system}.default + ]; }; formatting = pkgs.mkShell { packages = [ @@ -124,6 +126,16 @@ '') ]; }; + managing-secrets = pkgs.mkShell { + packages = [ + agenix.packages.${system}.default + ]; + }; + editing = pkgs.mkShell { + packages = [ + pkgs.nixd + ]; + }; }); }; } diff --git a/system/with/user/with/program/nixvim.nix b/system/with/user/with/program/nixvim.nix index 0fc0e02..2ee4c97 100644 --- a/system/with/user/with/program/nixvim.nix +++ b/system/with/user/with/program/nixvim.nix @@ -76,8 +76,9 @@ ''; plugins.lsp.enable = true; - plugins.lsp.servers.nil_ls.enable = true; - plugins.lsp.servers.nil_ls.settings.formatting.command = ["nixfmt"]; + plugins.lsp.servers.nixd.enable = true; + plugins.lsp.servers.nixd.autostart = true; + plugins.lsp.servers.nixd.cmd = ["nixd"]; plugins.lsp.servers.csharp_ls.enable = true; plugins.lsp.servers.marksman.enable = true; plugins.lsp.servers.jsonls.enable = true;