feat: fix nixfmt

This commit is contained in:
Noa Aarts 2024-10-28 11:00:04 +01:00
parent 2b593f2e72
commit a784ba021f
Signed by: noa
GPG key ID: 1850932741EFF672
3 changed files with 44 additions and 21 deletions

View file

@ -435,11 +435,28 @@ require("lazy").setup({
require("lazy-lsp").setup({ require("lazy-lsp").setup({
configs = { configs = {
nixd = {
settings = {
nixd = {
options = {
nixos = {
expr = "(builtins.getFlake \"/home/noa/nixos/\").nixosConfigurations.lambdaOS.options",
},
home_manager = {
expr = "(builtins.getFlake \"/home/noa/nixos/\").homeConfigurations.\"noa@lambdaOS\".options",
},
},
formatting = {
command = { "nixfmt" }
},
},
},
},
nil_ls = { nil_ls = {
settings = { settings = {
['nil'] = { ['nil'] = {
formatting = { formatting = {
command = { "nixfmt" }, command = { "nixfmt" }
}, },
}, },
}, },

View file

@ -1,28 +1,31 @@
{ pkgs, lib, config, ... }: {
pkgs,
lib,
config,
...
}:
{ {
options.modules.apps.neovim = { options.modules.apps.neovim = {
enableLanguages = lib.mkEnableOption "enable LSP languages"; enableLanguages = lib.mkEnableOption "enable LSP languages";
}; };
config = { config = {
programs.neovim = programs.neovim = {
{ enable = true;
enable = true; extraPackages = with pkgs; [
extraPackages = with pkgs; [ ripgrep
ripgrep luarocks
luarocks gnumake
gnumake wget
wget tree-sitter
nixpkgs-fmt fd
tree-sitter nixfmt-rfc-style
fd ];
]; defaultEditor = true;
defaultEditor = true; viAlias = true;
viAlias = true; vimAlias = true;
vimAlias = true;
extraLuaConfig = lib.fileContents extraLuaConfig = lib.fileContents ./init.lua;
./init.lua; };
};
}; };
} }

View file

@ -9,7 +9,10 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.desktopManager.plasma6.enable = true; services = {
desktopManager.plasma6.enable = true;
displayManager.defaultSession = "hyprland";
};
xdg.portal.config.common.default = "*"; xdg.portal.config.common.default = "*";
}; };