🚀 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,7 +4,9 @@ let
|
|||
emacs = with pkgs;
|
||||
((emacsPackagesFor emacsGcc).emacsWithPackages
|
||||
(epkgs: [ epkgs.vterm epkgs.emacsql-sqlite3 ]));
|
||||
cfg = config.modules.editors;
|
||||
in {
|
||||
config = lib.mkIf cfg.emacs {
|
||||
fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ];
|
||||
|
||||
home-manager.users.moritz = {
|
||||
|
@ -71,4 +73,5 @@ in {
|
|||
isync
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
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, ... }:
|
||||
|
||||
{
|
||||
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