probably broken, car ride modularizing
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.my.apps.office.enable = lib.mkEnableOption "enable";
|
||||
config = lib.mkIf config.my.apps.office.enable {
|
||||
users.users.jawz.packages = with pkgs; [
|
||||
@@ -11,5 +17,8 @@
|
||||
# wike # gtk wikipedia wow!
|
||||
# denaro # manage your finances
|
||||
];
|
||||
environment.variables = {
|
||||
CALIBRE_USE_SYSTEM_THEME = "1";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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; ([
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 ]);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,33 +1,48 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.my.emacs.enable = lib.mkEnableOption "enable";
|
||||
config = lib.mkIf config.my.emacs.enable {
|
||||
users.users.jawz.packages = (with pkgs; ([
|
||||
fd # modern find, faster searches
|
||||
fzf # fuzzy finder! super cool and useful
|
||||
ripgrep # modern grep
|
||||
tree-sitter # code parsing based on symbols and shit, I do not get it
|
||||
graphviz # graphs
|
||||
tetex # export pdf
|
||||
languagetool # proofreader for English
|
||||
home-manager.users.jawz = {
|
||||
programs.bash.shellAliases = {
|
||||
edit = "emacsclient -t";
|
||||
e = "edit";
|
||||
};
|
||||
services.lorri.enable = true;
|
||||
};
|
||||
users.users.jawz.packages =
|
||||
(with pkgs; ([
|
||||
fd # modern find, faster searches
|
||||
fzf # fuzzy finder! super cool and useful
|
||||
ripgrep # modern grep
|
||||
tree-sitter # code parsing based on symbols and shit, I do not get it
|
||||
graphviz # graphs
|
||||
tetex # export pdf
|
||||
languagetool # proofreader for English
|
||||
|
||||
# doom everywhere
|
||||
xorg.xwininfo
|
||||
xdotool
|
||||
xclip
|
||||
# doom everywhere
|
||||
xorg.xwininfo
|
||||
xdotool
|
||||
xclip
|
||||
|
||||
# lsps
|
||||
yaml-language-server
|
||||
markdownlint-cli
|
||||
])) ++ (with pkgs.nodePackages; [
|
||||
vscode-json-languageserver
|
||||
# linters
|
||||
prettier
|
||||
]);
|
||||
# lsps
|
||||
yaml-language-server
|
||||
markdownlint-cli
|
||||
]))
|
||||
++ (with pkgs.nodePackages; [
|
||||
vscode-json-languageserver
|
||||
# linters
|
||||
prettier
|
||||
]);
|
||||
services.emacs = {
|
||||
enable = true;
|
||||
package = with pkgs;
|
||||
((emacsPackagesFor emacs-gtk).emacsWithPackages
|
||||
(epkgs: with epkgs; ([ vterm ])));
|
||||
package =
|
||||
with pkgs;
|
||||
((emacsPackagesFor emacs-gtk).emacsWithPackages (epkgs: with epkgs; ([ vterm ])));
|
||||
defaultEditor = true;
|
||||
};
|
||||
home-manager.users.jawz.programs.bash.initExtra = ''
|
||||
|
||||
@@ -1,20 +1,52 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./base.nix ];
|
||||
config = {
|
||||
users.users.jawz.packages = (with pkgs; [ gallery-dl yt-dlp ]);
|
||||
home-manager.users.jawz = {
|
||||
programs = {
|
||||
xdg.configFile = {
|
||||
"gallery-dl/config.json".source = ../dotfiles/gallery-dl/config.json;
|
||||
};
|
||||
bash = {
|
||||
shellAliases = {
|
||||
comic = ''download -u jawz -i "$(cat $LC | fzf --multi --exact -i)"'';
|
||||
gallery = ''download -u jawz -i "$(cat $LW | fzf --multi --exact -i)"'';
|
||||
dl = "download -u jawz -i";
|
||||
};
|
||||
initExtra = ''
|
||||
list_root="${config.xdg.configHome}"/jawz/lists/jawz
|
||||
export LW=$list_root/watch.txt
|
||||
export LI=$list_root/instant.txt
|
||||
export LC=$list_root/comic.txt
|
||||
'';
|
||||
};
|
||||
};
|
||||
services.lorri.enable = true;
|
||||
};
|
||||
users.users.jawz.packages = (with pkgs; [ gallery-dl ]);
|
||||
my.scripts.download = {
|
||||
enable = true;
|
||||
install = true;
|
||||
service = false;
|
||||
name = "download";
|
||||
package = with pkgs.python3Packages;
|
||||
package =
|
||||
with pkgs.python3Packages;
|
||||
(buildPythonApplication rec {
|
||||
pname = "download";
|
||||
version = "2.0";
|
||||
version = "2.5";
|
||||
src = ../../scripts/download/.;
|
||||
doCheck = false;
|
||||
buildInputs = [ setuptools ];
|
||||
propagatedBuildInputs = [ pyyaml types-pyyaml ];
|
||||
propagatedBuildInputs = [
|
||||
pyyaml
|
||||
types-pyyaml
|
||||
yt-dlp
|
||||
];
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
18
modules/scripts/find-dup-episode.nix
Normal file
18
modules/scripts/find-dup-episode.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./base.nix ];
|
||||
config.my.scripts.find-dup-episodes = {
|
||||
enable = true;
|
||||
install = true;
|
||||
service = false;
|
||||
name = "find-dup-episodes";
|
||||
package = pkgs.writeScriptBin "find-dup-episodes" (
|
||||
builtins.readFile ../../scripts/find-dup-episodes.sh
|
||||
);
|
||||
};
|
||||
}
|
||||
18
modules/scripts/manage-library.nix
Normal file
18
modules/scripts/manage-library.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./base.nix ];
|
||||
config.my.scripts.manage-library = {
|
||||
enable = true;
|
||||
install = true;
|
||||
service = true;
|
||||
name = "manage-library";
|
||||
timer = "00:30";
|
||||
description = "scans the library directory and sorts files";
|
||||
package = pkgs.writeScriptBin "manage-library" (builtins.readFile ../../scripts/manage-library.sh);
|
||||
};
|
||||
}
|
||||
20
modules/scripts/nextcloud-cronjob.nix
Normal file
20
modules/scripts/nextcloud-cronjob.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./base.nix ];
|
||||
config.my.scripts.nextcloud-cronjob = {
|
||||
enable = true;
|
||||
install = false;
|
||||
service = true;
|
||||
timer = "*:0/10";
|
||||
name = "nextcloud-cronjob";
|
||||
description = "runs tasks for nextcloud";
|
||||
package = pkgs.writeScriptBin "nextcloud-cronjob" (
|
||||
builtins.readFile ../../scripts/nextcloud-cronjob.sh
|
||||
);
|
||||
};
|
||||
}
|
||||
@@ -1,11 +1,16 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./base.nix ];
|
||||
config.my.scripts.run = {
|
||||
enable = true;
|
||||
install = true;
|
||||
service = false;
|
||||
name = "run";
|
||||
package =
|
||||
pkgs.writeScriptBin "run" (builtins.readFile ../../scripts/run.sh);
|
||||
package = pkgs.writeScriptBin "run" (builtins.readFile ../../scripts/run.sh);
|
||||
};
|
||||
}
|
||||
|
||||
18
modules/scripts/sub-sync.nix
Normal file
18
modules/scripts/sub-sync.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./base.nix ];
|
||||
config.my.scripts.sub-sync = {
|
||||
enable = true;
|
||||
install = true;
|
||||
service = true;
|
||||
name = "sub-sync";
|
||||
timer = "22:00";
|
||||
description = "Syncronixes subtitles downloaded and modified the last day";
|
||||
package = pkgs.writeScriptBin "sub-sync" (builtins.readFile ../../scripts/sub-sync.sh);
|
||||
};
|
||||
}
|
||||
18
modules/scripts/update-dns.nix
Normal file
18
modules/scripts/update-dns.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./base.nix ];
|
||||
config.my.scripts.update-dns = {
|
||||
enable = true;
|
||||
install = true;
|
||||
service = true;
|
||||
name = "update-dns";
|
||||
timer = "*:0/30";
|
||||
description = "Updates the IP of all my domains";
|
||||
package = pkgs.writeScriptBin "update-dns" (builtins.readFile ../../scripts/update-dns.sh);
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,70 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.my.shell.tools.enable = lib.mkEnableOption "enable";
|
||||
config = lib.mkIf config.my.shell.tools.enable {
|
||||
home-manager.users.jawz.programs = {
|
||||
bash = {
|
||||
initExtra = ''
|
||||
if command -v fzf-share >/dev/null; then
|
||||
source "$(fzf-share)/key-bindings.bash"
|
||||
source "$(fzf-share)/completion.bash"
|
||||
fi
|
||||
'';
|
||||
shellAliases = {
|
||||
cd = "z";
|
||||
hh = "hstr";
|
||||
ls = "eza --icons --group-directories-first";
|
||||
rm = "trash";
|
||||
b = "bat";
|
||||
f = "fzf --multi --exact -i";
|
||||
unique-extensions = ''
|
||||
fd -tf | rev | cut -d. -f1 | rev |
|
||||
tr '[:upper:]' '[:lower:]' | sort |
|
||||
uniq --count | sort -rn'';
|
||||
};
|
||||
};
|
||||
xdg.configFile = {
|
||||
"htop/htoprc".source = ../dotfiles/htop/htoprc;
|
||||
};
|
||||
hstr.enable = true;
|
||||
htop = {
|
||||
enable = true;
|
||||
package = pkgs.htop-vim;
|
||||
};
|
||||
zoxide = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
};
|
||||
bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
pager = "less -FR";
|
||||
theme = "base16";
|
||||
};
|
||||
extraPackages = with pkgs.bat-extras; [
|
||||
batman # man pages
|
||||
batpipe # piping
|
||||
batgrep # ripgrep
|
||||
batdiff # this is getting crazy!
|
||||
batwatch # probably my next best friend
|
||||
prettybat # trans your sourcecode!
|
||||
];
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
starship.enable = true;
|
||||
tmux.enable = true;
|
||||
fzf.fuzzyCompletion = true;
|
||||
neovim = {
|
||||
enable = true;
|
||||
vimAlias = true;
|
||||
};
|
||||
};
|
||||
users.users.jawz.packages = with pkgs; [
|
||||
ripgrep # modern grep
|
||||
du-dust # rusty du similar to gdu
|
||||
@@ -14,4 +78,9 @@
|
||||
jq # linting
|
||||
];
|
||||
};
|
||||
environment.variables = {
|
||||
HISTFILE = "${XDG_STATE_HOME}/bash/history";
|
||||
LESSHISTFILE = "-";
|
||||
RIPGREP_CONFIG_PATH = "${XDG_CONFIG_HOME}/ripgrep/ripgreprc";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user