🚀 add editors module
This commit is contained in:
parent
e972d70a1b
commit
b280bf2b6e
6 changed files with 130 additions and 95 deletions
25
modules/editors/code.nix
Normal file
25
modules/editors/code.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.modules.editors;
|
||||
in {
|
||||
config = lib.mkIf cfg.code {
|
||||
home-manager.users.moritz = {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscode-fhsWithPackages (ps: with ps; [ git ]);
|
||||
extensions = with pkgs.vscode-extensions;
|
||||
[
|
||||
vscodevim.vim
|
||||
dracula-theme.theme-dracula
|
||||
esbenp.prettier-vscode
|
||||
pkief.material-icon-theme
|
||||
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [{
|
||||
name = "copilot";
|
||||
publisher = "GitHub";
|
||||
version = "1.7.3689";
|
||||
sha256 = "16zrrymxfymc0039zf48vm22rxjs22mh9zkvkpg45grx2a2m19zh";
|
||||
}];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,5 +1,28 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./emacs.nix ./idea.nix ./vim.nix ./vscode.nix ];
|
||||
with lib; {
|
||||
imports = [ ./emacs.nix ./idea.nix ./vim.nix ./code.nix ];
|
||||
|
||||
options.modules.editors = {
|
||||
emacs = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
example = false;
|
||||
};
|
||||
idea = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
vim = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
example = false;
|
||||
};
|
||||
code = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,71 +4,74 @@ let
|
|||
emacs = with pkgs;
|
||||
((emacsPackagesFor emacsGcc).emacsWithPackages
|
||||
(epkgs: [ epkgs.vterm epkgs.emacsql-sqlite3 ]));
|
||||
cfg = config.modules.editors;
|
||||
in {
|
||||
fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ];
|
||||
config = lib.mkIf cfg.emacs {
|
||||
fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ];
|
||||
|
||||
home-manager.users.moritz = {
|
||||
home.sessionPath = [ "/home/moritz/.config/emacs/bin/" ];
|
||||
services.emacs = {
|
||||
enable = true;
|
||||
package = emacs;
|
||||
home-manager.users.moritz = {
|
||||
home.sessionPath = [ "/home/moritz/.config/emacs/bin/" ];
|
||||
services.emacs = {
|
||||
enable = true;
|
||||
package = emacs;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
## Emacs itself
|
||||
binutils # native-comp needs 'as', provided by this
|
||||
emacs
|
||||
|
||||
## Doom dependencies
|
||||
git
|
||||
(ripgrep.override { withPCRE2 = true; })
|
||||
gnutls # for TLS connectivity
|
||||
|
||||
## Optional dependencies
|
||||
fd # faster projectile indexing
|
||||
imagemagick # for image-dired
|
||||
zstd # for undo-fu-session/undo-tree compression
|
||||
|
||||
## Module dependencies
|
||||
# :checkers spell
|
||||
# (aspellWithDicts (ds: with ds; [ en en-computers en-science de ]))
|
||||
hunspell
|
||||
hunspellDicts.en_GB-ize
|
||||
hunspellDicts.en_US
|
||||
hunspellDicts.de_DE
|
||||
|
||||
# :checkers grammar
|
||||
languagetool
|
||||
|
||||
# :tools lookup & :lang org +roam
|
||||
sqlite
|
||||
wordnet
|
||||
graphviz
|
||||
|
||||
# :lang latex & :lang org (latex previews)
|
||||
texlive.combined.scheme-full
|
||||
texlab
|
||||
|
||||
# :lang nix
|
||||
nixfmt # for formating nix
|
||||
rnix-lsp
|
||||
|
||||
# :lang markdown
|
||||
pandoc
|
||||
|
||||
# :app everywhere
|
||||
xdotool
|
||||
xorg.xwininfo
|
||||
xclip
|
||||
xorg.xprop
|
||||
|
||||
# :lang python
|
||||
nodePackages.pyright
|
||||
python-dev
|
||||
|
||||
# :email
|
||||
mu
|
||||
isync
|
||||
];
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
## Emacs itself
|
||||
binutils # native-comp needs 'as', provided by this
|
||||
emacs
|
||||
|
||||
## Doom dependencies
|
||||
git
|
||||
(ripgrep.override { withPCRE2 = true; })
|
||||
gnutls # for TLS connectivity
|
||||
|
||||
## Optional dependencies
|
||||
fd # faster projectile indexing
|
||||
imagemagick # for image-dired
|
||||
zstd # for undo-fu-session/undo-tree compression
|
||||
|
||||
## Module dependencies
|
||||
# :checkers spell
|
||||
# (aspellWithDicts (ds: with ds; [ en en-computers en-science de ]))
|
||||
hunspell
|
||||
hunspellDicts.en_GB-ize
|
||||
hunspellDicts.en_US
|
||||
hunspellDicts.de_DE
|
||||
|
||||
# :checkers grammar
|
||||
languagetool
|
||||
|
||||
# :tools lookup & :lang org +roam
|
||||
sqlite
|
||||
wordnet
|
||||
graphviz
|
||||
|
||||
# :lang latex & :lang org (latex previews)
|
||||
texlive.combined.scheme-full
|
||||
texlab
|
||||
|
||||
# :lang nix
|
||||
nixfmt # for formating nix
|
||||
rnix-lsp
|
||||
|
||||
# :lang markdown
|
||||
pandoc
|
||||
|
||||
# :app everywhere
|
||||
xdotool
|
||||
xorg.xwininfo
|
||||
xclip
|
||||
xorg.xprop
|
||||
|
||||
# :lang python
|
||||
nodePackages.pyright
|
||||
python-dev
|
||||
|
||||
# :email
|
||||
mu
|
||||
isync
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.moritz = {
|
||||
home.packages = with pkgs; [ jdk jetbrains.idea-ultimate ];
|
||||
let cfg = config.modules.editors;
|
||||
in {
|
||||
config = lib.mkIf cfg.idea {
|
||||
home-manager.users.moritz = {
|
||||
home.packages = with pkgs; [ jdk jetbrains.idea-ultimate ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.moritz.programs.neovim = {
|
||||
enable = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
let cfg = config.modules.editors;
|
||||
in {
|
||||
config = lib.mkIf cfg.vim {
|
||||
home-manager.users.moritz.programs.neovim = {
|
||||
enable = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.moritz = {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscode-fhsWithPackages (ps: with ps; [ git ]);
|
||||
extensions = with pkgs.vscode-extensions;
|
||||
[
|
||||
vscodevim.vim
|
||||
dracula-theme.theme-dracula
|
||||
esbenp.prettier-vscode
|
||||
pkief.material-icon-theme
|
||||
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [{
|
||||
name = "copilot";
|
||||
publisher = "GitHub";
|
||||
version = "1.7.3689";
|
||||
sha256 = "16zrrymxfymc0039zf48vm22rxjs22mh9zkvkpg45grx2a2m19zh";
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue