Reorganization
This commit is contained in:
1 parent
592f5dc0ef
commit
8e0e511335
15 files changed
+43
-11
No files matched your search
@@ -3,6 +3,14 @@
|
||||
{
|
||||
imports = [
|
||||
./ide/matlab.nix
|
||||
./utilities/docker.nix
|
||||
./language/cpp.nix
|
||||
./language/haskell.nix
|
||||
./language/js.nix
|
||||
./language/jupyter.nix
|
||||
./language/nix.nix
|
||||
./language/python.nix
|
||||
./language/rust.nix
|
||||
./language/tex.nix
|
||||
./utility/docker.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.rust;
|
||||
in
|
||||
{
|
||||
options.modules.cpp = {
|
||||
enable = mkEnableOption "cpp";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Allow unfree
|
||||
modules.unfree.allowedPackages = [
|
||||
"vscode-extension-ms-vscode-cpptools"
|
||||
# TODO: Remove, it should not be here
|
||||
# "android-studio-stable"
|
||||
# "android-sdk-cmdline-tools"
|
||||
# "android-sdk-tools"
|
||||
];
|
||||
|
||||
# Gitignore additions
|
||||
modules.git.ignores = [
|
||||
".ccls-cache"
|
||||
];
|
||||
|
||||
# Development packages
|
||||
home.packages = with pkgs; [
|
||||
gnumake
|
||||
];
|
||||
|
||||
# VSCode configuration
|
||||
programs.vscode = {
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
ms-vscode.cpptools
|
||||
ms-vscode.cmake-tools
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
# "C_Cpp.clang_format_fallbackStyle" = "{ BasedOnStyle: Google, IndentWidth: 4 }";
|
||||
};
|
||||
};
|
||||
|
||||
# Neovim configuration
|
||||
programs.nixvim = {
|
||||
plugins.lsp.servers.ccls.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.haskell;
|
||||
in
|
||||
{
|
||||
options.modules.haskell = {
|
||||
enable = mkEnableOption "haskell";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Development packages
|
||||
home.packages = with pkgs; [
|
||||
haskell.compiler.ghc948
|
||||
(haskell-language-server.override { supportedGhcVersions = [ "948" ]; })
|
||||
];
|
||||
|
||||
# VSCode configuration
|
||||
programs.vscode = {
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
haskell.haskell
|
||||
justusadam.language-haskell
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
"[haskell]" = { };
|
||||
# "haskell.formattingProvider" = "fourmolu";
|
||||
};
|
||||
};
|
||||
|
||||
# Neovim configuration
|
||||
programs.nixvim = { };
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.js;
|
||||
in
|
||||
{
|
||||
options.modules.js = {
|
||||
enable = mkEnableOption "js";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Development packages
|
||||
home.packages = with pkgs; [
|
||||
nodejs
|
||||
tailwindcss
|
||||
];
|
||||
|
||||
# VSCode configuration
|
||||
programs.vscode = {
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
bradlc.vscode-tailwindcss
|
||||
];
|
||||
|
||||
userSettings = { };
|
||||
};
|
||||
|
||||
# Neovim configuration
|
||||
programs.nixvim = { };
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
# TODO: Move to a module for notebooks in general
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.jupyter;
|
||||
in
|
||||
{
|
||||
options.modules.jupyter = {
|
||||
enable = mkEnableOption "jupyter";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Development packages
|
||||
home.packages = with pkgs; [
|
||||
evcxr
|
||||
];
|
||||
|
||||
modules.python.extraPythonPackages = p: [
|
||||
p.jupyter
|
||||
p.notebook
|
||||
];
|
||||
|
||||
# VSCode configuration
|
||||
programs.vscode = {
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
ms-toolsai.jupyter
|
||||
ms-toolsai.jupyter-renderers
|
||||
];
|
||||
|
||||
userSettings = { };
|
||||
};
|
||||
|
||||
# Neovim configuration
|
||||
programs.nixvim = { };
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.nix;
|
||||
in
|
||||
{
|
||||
options.modules.nix = {
|
||||
enable = mkEnableOption "nix";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Development packages
|
||||
home.packages = with pkgs; [
|
||||
nix-tree
|
||||
nixfmt-rfc-style
|
||||
nixd
|
||||
];
|
||||
|
||||
# Add nix tree
|
||||
xdg.desktopEntries.nix-tree = {
|
||||
exec = "${pkgs.nix-tree}/bin/nix-tree";
|
||||
name = "Nix Tree";
|
||||
terminal = true;
|
||||
type = "Application";
|
||||
};
|
||||
|
||||
# VSCode configuration
|
||||
programs.vscode = {
|
||||
extensions = with pkgs.vscode-extensions; [ jnoortheen.nix-ide ];
|
||||
|
||||
userSettings = {
|
||||
"[nix]" = {
|
||||
"editor.tabSize" = 2;
|
||||
};
|
||||
"nix.enableLanguageServer" = true;
|
||||
"nix.serverPath" = "nixd";
|
||||
"nix.serverSettings" = {
|
||||
nixd = {
|
||||
formatting = {
|
||||
command = [ "nixfmt" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Neovim configuration
|
||||
programs.nixvim = {
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.python;
|
||||
package = pkgs.python3.withPackages cfg.extraPythonPackages;
|
||||
in
|
||||
{
|
||||
options.modules.python = {
|
||||
enable = mkEnableOption "python";
|
||||
extraPythonPackages = mkOption {
|
||||
type = types.functionTo (types.listOf types.package) // {
|
||||
merge =
|
||||
loc: defs: p:
|
||||
lib.concatMap (def: (def.value p)) defs;
|
||||
};
|
||||
default = p: [ ];
|
||||
description = "Extra Python packages to install";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Development packages
|
||||
home.packages = [
|
||||
package
|
||||
];
|
||||
|
||||
# Allow unfree
|
||||
modules.unfree.allowedPackages = [
|
||||
"vscode-extension-MS-python-vscode-pylance"
|
||||
];
|
||||
|
||||
# VSCode configuration
|
||||
programs.vscode = {
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
ms-python.python
|
||||
ms-python.debugpy
|
||||
ms-python.vscode-pylance
|
||||
ms-python.black-formatter
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
"[python]" = {
|
||||
"editor.defaultFormatter" = "ms-python.black-formatter";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Neovim configuration
|
||||
programs.nixvim = { };
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.rust;
|
||||
in
|
||||
{
|
||||
options.modules.rust = {
|
||||
enable = mkEnableOption "rust";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Development packages
|
||||
home.packages = with pkgs; [
|
||||
rustup
|
||||
# rustc
|
||||
# cargo
|
||||
gcc
|
||||
lldb
|
||||
bacon
|
||||
# rust-analyzer
|
||||
# rustfmt
|
||||
# clippy
|
||||
];
|
||||
|
||||
# VSCode configuration
|
||||
programs.vscode = {
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
rust-lang.rust-analyzer
|
||||
vadimcn.vscode-lldb
|
||||
tamasfe.even-better-toml
|
||||
serayuzgur.crates
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
"[rust]" = {
|
||||
"editor.inlayHints.enabled" = "off";
|
||||
};
|
||||
"rust-analyzer.check.command" = "clippy";
|
||||
"rust-analyzer.showUnlinkedFileNotification" = false;
|
||||
};
|
||||
};
|
||||
|
||||
# Neovim configuration
|
||||
programs.nixvim = {
|
||||
plugins.rustaceanvim = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.tex;
|
||||
in
|
||||
{
|
||||
options.modules.tex = {
|
||||
enable = mkEnableOption "tex";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Development packages
|
||||
home.packages = with pkgs; [
|
||||
(texlive.combine {
|
||||
inherit (texlive) scheme-full;
|
||||
})
|
||||
];
|
||||
|
||||
# Pygments for minted
|
||||
modules.python.extraPythonPackages = p: [
|
||||
p.pygments
|
||||
];
|
||||
|
||||
# VSCode configuration
|
||||
programs.vscode = {
|
||||
extensions = with pkgs.vscode-extensions; [ jnoortheen.nix-ide ];
|
||||
|
||||
userSettings = {
|
||||
"[tex]" = { };
|
||||
};
|
||||
};
|
||||
|
||||
# Neovim configuration
|
||||
programs.nixvim = {
|
||||
extraConfigVim = ''
|
||||
" Enforce latexmk
|
||||
let g:vimtex_compiler_method = 'latexmk'
|
||||
|
||||
" Set latexmk compilation settings
|
||||
let g:vimtex_compiler_latexmk = {
|
||||
\ 'options': [
|
||||
\ '-shell-escape',
|
||||
\ '-verbose',
|
||||
\ '-file-line-error',
|
||||
\ '-synctex=1',
|
||||
\ '-interaction=nonstopmode',
|
||||
\ ],
|
||||
\}
|
||||
'';
|
||||
|
||||
# Vimtex plugin
|
||||
plugins.vimtex = {
|
||||
enable = true;
|
||||
texlivePackage = null;
|
||||
settings = {
|
||||
view_method = "zathura";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
File renamed without changes.
Reference in new issue
Block a user