Added nix LSP (nil_ls)

I love it, it just works out of the box, unlike nixd which was so broken
I couldn't get it to work, and it's so much more featureful, it has
insane autocompletion for keywords and vars and I can go to
definition/go to references on files/vars etc and it has diagnostics and
shows when there is an error, it's so much better, and it has completion
for nix options
This commit is contained in:
2025-04-23 18:34:02 +03:00
parent 9745e7004f
commit bdbde54648
10 changed files with 11 additions and 31 deletions

View File

@@ -147,23 +147,7 @@ return {
},
},
}, -- zig
-- nixd = {
-- mason = false,
-- cmd = { 'nixd' },
-- settings = {
-- nixd = {
-- nixpkgs = { expr = 'import <nixpkgs> { }' },
-- -- options = {
-- -- nixos = {
-- -- expr = '(builtins.getFlake \\"/home/kyren/dotfiles/flake.nix").nixosConfigurations.laptop-nixos.options',
-- -- },
-- -- home_manager = {
-- -- expr = '(builtins.getFlake \\"/home/kyren/dotfiles/flake.nix").homeConfigurations.laptop-nixos.options',
-- -- },
-- -- },
-- },
-- },
-- },
nil_ls = {}, -- nix
asm_lsp = {
mason = false,
cmd = { 'asm-lsp' },

View File

@@ -13,13 +13,13 @@
outputs = { self, nixpkgs, ... }@inputs: {
nixosConfigurations = {
laptop = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
specialArgs = { inherit inputs; };
modules = [
./hosts/laptop.nix
];
};
lapsktop = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
specialArgs = { inherit inputs; };
modules = [
./hosts/lapsktop.nix
];

View File

@@ -1,7 +1,7 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ config, lib, modulesPath, ... }:
{
imports =

View File

@@ -1,4 +1,4 @@
{ config, pkgs, inputs, ... }: {
{ pkgs, inputs, ... }: {
home.username = "kyren";
home.homeDirectory = "/home/kyren";

View File

@@ -1,4 +1,4 @@
{ config, pkgs, inputs, ... }: {
{ pkgs, inputs, ... }: {
imports = [
./hardware-configuration-laptop.nix

View File

@@ -1,4 +1,4 @@
{ config, pkgs, inputs, ... }: {
{ pkgs, inputs, ... }: {
imports = [
./hardware-configuration-laptop.nix

View File

@@ -4,7 +4,7 @@
# #
#--------------------------------------#
{config, pkgs, ...}: {
{pkgs, ...}: {
# User
users.users.kyren = {

View File

@@ -1,6 +1,5 @@
{ config, pkgs, ... }:
{ ... }: {
{
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;

View File

@@ -1,6 +1,4 @@
{ config, pkgs, ... }:
{
{ ... }: {
# battery levels notifier
systemd.timers."battery-notifier" = {

View File

@@ -1,6 +1,5 @@
{ config, pkgs, ... }:
{ ... }: {
{
# Enable networking
networking.networkmanager.enable = true;