Add more vscode extensions & nix-direnv
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,6 +1,16 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
packages = with pkgs; [ python3 ];
|
packages = with pkgs; [
|
||||||
|
(python3.withPackages (
|
||||||
|
python-pkgs: with python-pkgs; [
|
||||||
|
pip
|
||||||
|
numpy
|
||||||
|
pandas
|
||||||
|
python-dotenv
|
||||||
|
requests
|
||||||
|
]
|
||||||
|
))
|
||||||
|
];
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
exec $SHELL
|
exec $SHELL
|
||||||
|
17
hosts/common/user/configs/console/nix-direnv/default.nix
Normal file
17
hosts/common/user/configs/console/nix-direnv/default.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
user ? throw "user argument is required",
|
||||||
|
home ? throw "home argument is required",
|
||||||
|
}:
|
||||||
|
{ inputs, ... }:
|
||||||
|
{
|
||||||
|
home-manager.users.${user} = {
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
silent = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.persistence."/persist"."${home}/.config/direnv/direnv.toml" = { };
|
||||||
|
}
|
@@ -35,7 +35,15 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
mutableExtensionsDir = false;
|
mutableExtensionsDir = false;
|
||||||
extensions = with pkgs.vscode-extensions; [ naumovs.color-highlight ];
|
|
||||||
|
extensions = with pkgs.vscode-extensions; [
|
||||||
|
mkhl.direnv
|
||||||
|
mhutchie.git-graph
|
||||||
|
ms-azuretools.vscode-docker
|
||||||
|
ms-vsliveshare.vsliveshare
|
||||||
|
github.copilot
|
||||||
|
naumovs.color-highlight
|
||||||
|
];
|
||||||
|
|
||||||
userSettings = {
|
userSettings = {
|
||||||
"diffEditor.ignoreTrimWhitespace" = false;
|
"diffEditor.ignoreTrimWhitespace" = false;
|
||||||
@@ -97,6 +105,9 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [ ./langs/nix.nix ];
|
imports = [
|
||||||
|
./langs/nix
|
||||||
|
./langs/python
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -1,16 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
programs.vscode = {
|
|
||||||
userSettings = {
|
|
||||||
"nix.enableLanguageServer" = true;
|
|
||||||
"nix.formatterPath" = "nixpkgs-fmt";
|
|
||||||
"nix.serverSettings" = { };
|
|
||||||
};
|
|
||||||
extensions = with pkgs; with vscode-extensions; [ jnoortheen.nix-ide ];
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
nil
|
|
||||||
nixpkgs-fmt
|
|
||||||
];
|
|
||||||
}
|
|
19
hosts/common/user/configs/gui/vscode/langs/nix/default.nix
Normal file
19
hosts/common/user/configs/gui/vscode/langs/nix/default.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.vscode = {
|
||||||
|
userSettings = {
|
||||||
|
"nix.enableLanguageServer" = true;
|
||||||
|
"nix.serverPath" = lib.meta.getExe pkgs.nil;
|
||||||
|
"nix.serverSettings" = {
|
||||||
|
nil.formatting.command = [
|
||||||
|
(lib.meta.getExe pkgs.nix)
|
||||||
|
"fmt"
|
||||||
|
"--"
|
||||||
|
"--"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
extensions = with pkgs; with vscode-extensions; [ jnoortheen.nix-ide ];
|
||||||
|
};
|
||||||
|
}
|
@@ -0,0 +1,15 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.vscode.extensions =
|
||||||
|
with pkgs;
|
||||||
|
with vscode-extensions;
|
||||||
|
[
|
||||||
|
ms-python.python
|
||||||
|
ms-python.vscode-pylance
|
||||||
|
ms-python.debugpy
|
||||||
|
ms-python.pylint
|
||||||
|
ms-toolsai.jupyter
|
||||||
|
ms-toolsai.jupyter-renderers
|
||||||
|
njpwerner.autodocstring
|
||||||
|
];
|
||||||
|
}
|
@@ -21,6 +21,7 @@ in
|
|||||||
(import ../../common/user/configs/console/imagemagick { inherit user home; })
|
(import ../../common/user/configs/console/imagemagick { inherit user home; })
|
||||||
(import ../../common/user/configs/console/ncdu { inherit user home; })
|
(import ../../common/user/configs/console/ncdu { inherit user home; })
|
||||||
(import ../../common/user/configs/console/neovim { inherit user home; })
|
(import ../../common/user/configs/console/neovim { inherit user home; })
|
||||||
|
(import ../../common/user/configs/console/nix-direnv { inherit user home; })
|
||||||
(import ../../common/user/configs/console/nixpkgs { inherit user home; })
|
(import ../../common/user/configs/console/nixpkgs { inherit user home; })
|
||||||
(import ../../common/user/configs/console/pipewire { inherit user home; })
|
(import ../../common/user/configs/console/pipewire { inherit user home; })
|
||||||
(import ../../common/user/configs/console/ranger { inherit user home; })
|
(import ../../common/user/configs/console/ranger { inherit user home; })
|
||||||
|
Reference in New Issue
Block a user