Rewrite & add dev modules

For python, rust, love2D/lua, and node
This commit is contained in:
Henrik Lissner 2020-01-12 19:47:33 -05:00
parent 5666b95e2b
commit 05a12cd80d
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
8 changed files with 76 additions and 17 deletions

View file

@ -15,7 +15,7 @@
<my/modules/vm.nix> # virtualbox for testing <my/modules/vm.nix> # virtualbox for testing
<my/modules/browser/firefox.nix> <my/modules/browser/firefox.nix>
<my/modules/dev/cpp.nix> <my/modules/dev/cc.nix>
<my/modules/dev/rust.nix> <my/modules/dev/rust.nix>
<my/modules/editors/emacs.nix> <my/modules/editors/emacs.nix>
<my/modules/editors/vim.nix> <my/modules/editors/vim.nix>

View file

@ -6,7 +6,10 @@
my.packages = with pkgs; [ my.packages = with pkgs; [
clang clang
gcc gcc
bear
gdb
cmake cmake
llvmPackages.libcxx llvmPackages.libcxx
ccls
]; ];
} }

View file

@ -4,7 +4,7 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ my.packages = with pkgs; [
godot godot
]; ];
} }

View file

@ -0,0 +1,10 @@
{ config, lib, pkgs, ... }:
{
my.packages = with pkgs; [
love
lua
luaPackages.moonscript
luarocks
];
}

View file

@ -3,16 +3,21 @@
{ {
imports = [ ./. ]; imports = [ ./. ];
environment = { my = {
variables = { packages = with pkgs; [
NPM_CONFIG_USERCONFIG = "$XDG_CONFIG_HOME/npm/config";
NPM_CONFIG_CACHE = "$XDG_CACHE_HOME/npm";
NPM_CONFIG_TMP = "$XDG_RUNTIME_DIR/npm";
NPM_CONFIG_PREFIX = "$XDG_CACHE_HOME/npm";
};
systemPackages = with pkgs; [
nodejs nodejs
nodePackages.javascript-typescript-langserver
]; ];
env.NPM_CONFIG_USERCONFIG = "$XDG_CONFIG_HOME/npm/config";
env.NPM_CONFIG_CACHE = "$XDG_CACHE_HOME/npm";
env.NPM_CONFIG_TMP = "$XDG_RUNTIME_DIR/npm";
env.NPM_CONFIG_PREFIX = "$XDG_CACHE_HOME/npm";
env.NODE_REPL_HISTORY = "$XDG_CACHE_HOME/node/repl_history";
env.PATH = [ "$(yarn global bin)" ];
# Run locally installed bin-script, e.g. n coffee file.coffee
alias.n = "PATH=\"$(npm bin):$PATH\"";
alias.ya = "yarn";
}; };
} }

View file

@ -0,0 +1,31 @@
{ config, lib, pkgs, ... }:
{
my = {
packages = with pkgs; [
python37
python37Packages.pip
python37Packages.ipython
python37Packages.black
python37Packages.setuptools
python37Packages.pylint
python37Packages.poetry
];
env.IPYTHONDIR = "$XDG_CONFIG_HOME/ipython";
env.PIP_CONFIG_FILE = "$XDG_CONFIG_HOME/pip/pip.conf";
env.PIP_LOG_FILE = "$XDG_DATA_HOME/pip/log";
env.PYLINTHOME = "$XDG_DATA_HOME/pylint";
env.PYLINTRC = "$XDG_CONFIG_HOME/pylint/pylintrc";
env.PYTHONSTARTUP = "$XDG_CONFIG_HOME/python/pythonrc";
zsh.rc = lib.readFile <my/config/python/aliases.zsh>;
alias.py = "python";
alias.py2 = "python2";
alias.py3 = "python3";
alias.po = "poetry";
alias.ipy = "ipython --no-banner";
alias.ipylab = "ipython --pylab=qt5 --no-banner";
};
}

View file

@ -1,10 +1,23 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
my = { my = {
packages = with pkgs; [ rustup ]; packages = with pkgs; [
env.CARGO_HOME = "$XDG_DATA_HOME/cargo"; rustup
rustfmt
rls
];
env.RUSTUP_HOME = "$XDG_DATA_HOME/rustup"; env.RUSTUP_HOME = "$XDG_DATA_HOME/rustup";
env.CARGO_HOME = "$XDG_DATA_HOME/cargo";
env.PATH = [ "$CARGO_HOME/bin" ]; env.PATH = [ "$CARGO_HOME/bin" ];
alias.rs = "rustc";
alias.rsp = "rustup";
alias.ca = "cargo";
setup = ''
${pkgs.rustup}/bin/rustup update nightly
${pkgs.rustup}/bin/rustup default nightly
'';
}; };
} }

View file

@ -22,9 +22,6 @@
# Module dependencies # Module dependencies
sqlite # :tools (lookup +docsets) sqlite # :tools (lookup +docsets)
texlive.combined.scheme-medium # :lang org -- for latex previews texlive.combined.scheme-medium # :lang org -- for latex previews
ccls # :lang (cc +lsp)
nodePackages.javascript-typescript-langserver # :lang (javascript +lsp)
rls
]; ];
env.PATH = [ "$HOME/.emacs.d/bin" ]; env.PATH = [ "$HOME/.emacs.d/bin" ];