Skip to content

Commit

Permalink
build(vscode): better nix lsp config
Browse files Browse the repository at this point in the history
  • Loading branch information
zakuciael committed Oct 24, 2024
1 parent 55ae596 commit c667bc5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 96 deletions.
19 changes: 12 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
{
"nix.enableLanguageServer": true,
"nix.serverPath": "nil",
"nix.serverPath": "nixd",
"nix.serverSettings": {
"nil": {
"nix": {
"flake": {
"autoEvalInputs": false,
"nixpkgsInputName": "nixpkgs",
"nixd": {
"formatting": {
"command": ["alejandra"],
},
"nixpkgs": {
"expr": "import <nixpkgs> { }"
},
"options": {
"nixos": {
"expr": "(builtins.getFlake (builtins.toString ./.)).nixosConfigurations.${builtins.replaceStrings [\"\\n\"] [\"\"] (builtins.readFile \"/etc/hostname\")}.options",
}
}
}
},
},
"[nix]": {
"editor.insertSpaces": true,
Expand Down
1 change: 1 addition & 0 deletions configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ with lib.my; {
!include ${config.sops.templates."nix/access_tokens.conf".path}
'';
package = pkgs.nixFlakes;
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
};

nixpkgs.config = {
Expand Down
74 changes: 0 additions & 74 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
alejandra = {
url = "github:kamadorueda/alejandra/3.0.0";
inputs.nixpkgs.follows = "nixpkgs";
inputs.fenix.follows = "fenix";
inputs.flakeCompat.follows = "flake-compat";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
Expand All @@ -48,11 +42,6 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
nil = {
url = "github:oxalica/nil";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
aagl = {
url = "github:ezKEa/aagl-gtk-on-nix/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
Expand Down Expand Up @@ -92,8 +81,6 @@
flakeInputs
// {
distro-grub-themes = flakeInputs.distro-grub-themes.packages.${system};
nil = flakeInputs.nil.packages.${system};
alejandra = flakeInputs.alejandra.packages.${system};
rofi-jetbrains = flakeInputs.rofi-jetbrains.packages.${system};
nostale-dev-env =
flakeInputs.nostale-dev-env
Expand Down
4 changes: 2 additions & 2 deletions modules/desktop/apps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ in {
programs.fish.shellAliases.open = "${getBin pkgs.xdg-utils}/bin/xdg-open";
home.packages = with pkgs; [
# Nix
inputs.nil.default
inputs.alejandra.default
nixd
alejandra

# Browser
google-chrome
Expand Down

0 comments on commit c667bc5

Please sign in to comment.