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({
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 = {
settings = {
['nil'] = {
formatting = {
command = { "nixfmt" },
command = { "nixfmt" }
},
},
},

View file

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

View file

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