probably broken, car ride modularizing

This commit is contained in:
Danilo Reyes
2024-06-07 17:07:21 -06:00
parent f9a7f9d8de
commit 46cdbd8a09
23 changed files with 639 additions and 360 deletions

View File

@@ -1,7 +1,16 @@
{ config, lib, pkgs, ... }: {
{
config,
lib,
pkgs,
...
}:
{
options.my.dev.docker.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.dev.docker.enable {
users.users.jawz.packages = (with pkgs; [ dockfmt ])
++ (with pkgs.nodePackages; [ dockerfile-language-server-nodejs ]);
users.users.jawz.packages =
(with pkgs; [ dockfmt ]) ++ (with pkgs.nodePackages; [ dockerfile-language-server-nodejs ]);
};
environment.variables = {
DOCKER_CONFIG = "${XDG_CONFIG_HOME}/docker";
};
}

View File

@@ -1,9 +1,21 @@
{ config, lib, pkgs, ... }: {
{
config,
lib,
pkgs,
...
}:
{
options.my.dev.haskell.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.dev.haskell.enable {
users.users.jawz.packages = with pkgs; ([
ghc # compiler
haskell-language-server # lsp
]);
environment.variables = {
CABAL_DIR = "${XDG_CACHE_HOME}/cabal";
CARGO_HOME = "${XDG_DATA_HOME}/cargo";
STACK_ROOT = "${XDG_DATA_HOME}/stack";
GHCUP_USE_XDG_DIRS = "true";
};
};
}

View File

@@ -1,7 +1,28 @@
{ config, lib, pkgs, ... }: {
{
config,
lib,
pkgs,
...
}:
{
options.my.dev.javascript.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.dev.javascript.enable {
users.users.jawz.packages = (with pkgs; [ nodejs ])
++ (with pkgs.nodePackages; [ pnpm ]);
home-manager.users.jawz.programs.xdg.configFile = {
"npm/npmrc".source = ../dotfiles/npm/npmrc;
"configstore/update-notifier-npm-check.json".source = ../dotfiles/npm/update-notifier-npm-check.json;
};
users.users.jawz.packages = (with pkgs; [ nodejs ]) ++ (with pkgs.nodePackages; [ pnpm ]);
environment.variables = {
NPM_CONFIG_USERCONFIG = "${XDG_CONFIG_HOME}/npm/npmrc";
PNPM_HOME = "${XDG_DATA_HOME}/pnpm";
PATH = [
"${XDG_DATA_HOME}/npm/bin"
"${XDG_DATA_HOME}/pnpm"
];
};
environment.variables = {
VISUAL = "emacsclient -ca emacs";
PATH = [ "${XDG_CONFIG_HOME}/emacs/bin" ];
};
};
}

View File

@@ -1,4 +1,10 @@
{ config, lib, pkgs, ... }: {
{
config,
lib,
pkgs,
...
}:
{
options.my.dev.nix.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.dev.nix.enable {
users.users.jawz.packages = with pkgs; ([

View File

@@ -1,24 +1,38 @@
{ config, lib, pkgs, ... }: {
{
config,
lib,
pkgs,
...
}:
{
options.my.dev.python.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.dev.python.enable {
users.users.jawz.packages = (with pkgs; ([
pipenv # python development workflow for humans
(python3.withPackages (ps:
with ps; [
black # Python code formatter
editorconfig # follow rules of contributin
flake8 # wraper for pyflakes, pycodestyle and mccabe
isort # sort Python imports
pyflakes # checks source code for errors
pylint # bug and style checker for python
speedtest-cli # check internet speed from the comand line
# nose # testing and running python scripts
# poetry # dependency management made easy
# pytest # framework for writing tests
]))
])) ++ (with pkgs.nodePackages;
[
home-manager.users.jawz.programs.xdg.configFile = {
"python/pythonrc".source = ../dotfiles/pythonrc;
};
users.users.jawz.packages =
(with pkgs; ([
pipenv # python development workflow for humans
(python3.withPackages (
ps: with ps; [
black # Python code formatter
editorconfig # follow rules of contributin
flake8 # wraper for pyflakes, pycodestyle and mccabe
isort # sort Python imports
pyflakes # checks source code for errors
pylint # bug and style checker for python
speedtest-cli # check internet speed from the comand line
# nose # testing and running python scripts
# poetry # dependency management made easy
# pytest # framework for writing tests
]
))
]))
++ (with pkgs.nodePackages; [
pyright # LSP
]);
environment.variables = {
PYTHONSTARTUP = "${XDG_CONFIG_HOME}/python/pythonrc";
};
};
}

View File

@@ -1,10 +1,18 @@
{ config, lib, pkgs, ... }: {
{
config,
lib,
pkgs,
...
}:
{
options.my.dev.sh.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.dev.sh.enable {
users.users.jawz.packages = (with pkgs; [
bashdb # autocomplete
shellcheck # linting
shfmt # a shell parser and formatter
]) ++ (with pkgs.nodePackages; [ bash-language-server ]);
users.users.jawz.packages =
(with pkgs; [
bashdb # autocomplete
shellcheck # linting
shfmt # a shell parser and formatter
])
++ (with pkgs.nodePackages; [ bash-language-server ]);
};
}