Compare commits
No commits in common. "0beab15f24bda98e5d46f40109a04d8e7c617d1e" and "bb08c527902c3b81e9f5b1e42f4c70963f92f7e6" have entirely different histories.
0beab15f24
...
bb08c52790
@ -2,46 +2,14 @@
|
|||||||
inputs,
|
inputs,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
inherit (pkgs) fd fzf;
|
|
||||||
inherit (inputs.jawz-scripts.packages.x86_64-linux) pokemon-colorscripts;
|
|
||||||
shellType = osConfig.my.shell.type;
|
|
||||||
commonInit = ''
|
|
||||||
${pokemon-colorscripts}/bin/pokemon-colorscripts -r --no-title
|
|
||||||
export command_timeout=60
|
|
||||||
'';
|
|
||||||
commonAliases = {
|
|
||||||
cp = "cp -i";
|
|
||||||
mv = "mv -i";
|
|
||||||
mkdir = "mkdir -p";
|
|
||||||
mkcd = "(){ mkdir -p \"$1\" && cd \"$1\" }";
|
|
||||||
copy = "xclip -selection clipboard";
|
|
||||||
cdp = "pwd | copy";
|
|
||||||
cfp = "(){ readlink -f \"$1\" | copy }";
|
|
||||||
".." = "cd ..";
|
|
||||||
"..." = "cd ../..";
|
|
||||||
".3" = "cd ../../..";
|
|
||||||
".4" = "cd ../../../..";
|
|
||||||
".5" = "cd ../../../../..";
|
|
||||||
c = "cat";
|
|
||||||
sc = "systemctl --user";
|
|
||||||
jc = "journalctl --user -xefu";
|
|
||||||
open-gallery = ''
|
|
||||||
cd /srv/pool/scrapping/JawZ/gallery-dl &&
|
|
||||||
xdg-open "$(${fd}/bin/fd . ./ Husbands wikifeet -tdirectory -d 1 | ${fzf}/bin/fzf -i)"'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
home.stateVersion = "23.05";
|
home.stateVersion = "23.05";
|
||||||
programs = {
|
programs = {
|
||||||
direnv = {
|
direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableBashIntegration = shellType == "bash";
|
enableBashIntegration = true;
|
||||||
enableZshIntegration = shellType == "zsh";
|
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
};
|
};
|
||||||
git = {
|
git = {
|
||||||
@ -49,30 +17,45 @@ in
|
|||||||
userName = "Danilo Reyes";
|
userName = "Danilo Reyes";
|
||||||
userEmail = "CaptainJawZ@protonmail.com";
|
userEmail = "CaptainJawZ@protonmail.com";
|
||||||
};
|
};
|
||||||
bash = lib.mkIf (shellType == "bash") {
|
bash =
|
||||||
enable = true;
|
let
|
||||||
historyFile = "\${XDG_STATE_HOME}/bash/history";
|
inherit (pkgs) fd fzf;
|
||||||
shellAliases = commonAliases;
|
inherit (inputs.jawz-scripts.packages.x86_64-linux) pokemon-colorscripts;
|
||||||
enableVteIntegration = true;
|
in
|
||||||
initExtra = commonInit;
|
{
|
||||||
historyControl = [
|
enable = true;
|
||||||
"erasedups"
|
historyFile = "\${XDG_STATE_HOME}/bash/history";
|
||||||
"ignorespace"
|
historyControl = [
|
||||||
"ignoredups"
|
"erasedups"
|
||||||
];
|
"ignorespace"
|
||||||
};
|
"ignoredups"
|
||||||
zsh = lib.mkIf (shellType == "zsh") {
|
];
|
||||||
enable = true;
|
shellAliases = {
|
||||||
dotDir = ".config/zsh";
|
cp = "cp -i";
|
||||||
shellAliases = commonAliases;
|
mv = "mv -i";
|
||||||
initContent = commonInit;
|
mkdir = "mkdir -p";
|
||||||
history = {
|
mkcd = "(){ mkdir -p \"$1\" && cd \"$1\" }";
|
||||||
path = "\${XDG_STATE_HOME}/zsh/history";
|
copy = "xclip -selection clipboard";
|
||||||
expireDuplicatesFirst = true;
|
cdp = "pwd | copy";
|
||||||
ignoreSpace = true;
|
cfp = "(){ readlink -f \"$1\" | copy }";
|
||||||
ignoreAllDups = true;
|
".." = "cd ..";
|
||||||
|
"..." = "cd ../..";
|
||||||
|
".3" = "cd ../../..";
|
||||||
|
".4" = "cd ../../../..";
|
||||||
|
".5" = "cd ../../../../..";
|
||||||
|
c = "cat";
|
||||||
|
sc = "systemctl --user";
|
||||||
|
jc = "journalctl --user -xefu";
|
||||||
|
open-gallery = ''
|
||||||
|
cd /srv/pool/scrapping/JawZ/gallery-dl &&
|
||||||
|
xdg-open "$(${fd}/bin/fd . ./ Husbands wikifeet -tdirectory -d 1 | ${fzf}/bin/fzf -i)"'';
|
||||||
|
};
|
||||||
|
enableVteIntegration = true;
|
||||||
|
initExtra = ''
|
||||||
|
${pokemon-colorscripts}/bin/pokemon-colorscripts -r --no-title
|
||||||
|
export command_timeout=60
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
xdg = {
|
xdg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
shellType = config.my.shell.type;
|
|
||||||
krita-thumbnailer = pkgs.writeTextFile {
|
krita-thumbnailer = pkgs.writeTextFile {
|
||||||
name = "krita-thumbnailer";
|
name = "krita-thumbnailer";
|
||||||
destination = "/share/thumbnailers/kra.thumbnailer";
|
destination = "/share/thumbnailers/kra.thumbnailer";
|
||||||
@ -40,8 +38,7 @@ in
|
|||||||
ghostty = {
|
ghostty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.ghostty;
|
package = pkgs.ghostty;
|
||||||
enableBashIntegration = shellType == "bash";
|
enableBashIntegration = true;
|
||||||
enableZshIntegration = shellType == "zsh";
|
|
||||||
installBatSyntax = true;
|
installBatSyntax = true;
|
||||||
installVimSyntax = true;
|
installVimSyntax = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
"doom/templates/programming.org".source = ../../dotfiles/doom/templates/programming.org;
|
"doom/templates/programming.org".source = ../../dotfiles/doom/templates/programming.org;
|
||||||
};
|
};
|
||||||
services.lorri.enable = true;
|
services.lorri.enable = true;
|
||||||
programs.${config.my.shell.type}.shellAliases = {
|
programs.bash.shellAliases = {
|
||||||
edit = "emacsclient -t";
|
edit = "emacsclient -t";
|
||||||
e = "edit";
|
e = "edit";
|
||||||
};
|
};
|
||||||
|
|||||||
@ -5,7 +5,6 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
shellType = config.my.shell.type;
|
|
||||||
packages = builtins.attrValues {
|
packages = builtins.attrValues {
|
||||||
inherit (pkgs)
|
inherit (pkgs)
|
||||||
nixfmt-rfc-style # formatting
|
nixfmt-rfc-style # formatting
|
||||||
@ -32,12 +31,5 @@ in
|
|||||||
};
|
};
|
||||||
config = lib.mkIf config.my.dev.nix.enable {
|
config = lib.mkIf config.my.dev.nix.enable {
|
||||||
users.users.jawz = { inherit packages; };
|
users.users.jawz = { inherit packages; };
|
||||||
home-manager.users.jawz.programs.${shellType}.shellAliases = {
|
|
||||||
nixformat = ''
|
|
||||||
nix run unstable#deadnix -- -e && \
|
|
||||||
nix run unstable#nixfmt-tree && \
|
|
||||||
nix run unstable#statix fix
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,33 +16,21 @@
|
|||||||
inherit (inputs.jawz-scripts.packages.x86_64-linux) download;
|
inherit (inputs.jawz-scripts.packages.x86_64-linux) download;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home-manager.users.jawz.programs.${config.my.shell.type} = {
|
home-manager.users.jawz = {
|
||||||
shellAliases = {
|
programs.bash = {
|
||||||
dl = "${download}/bin/download -u jawz -i";
|
shellAliases = {
|
||||||
comic = ''dl "$(cat "$LC" | fzf --multi --exact -i)"'';
|
dl = "${download}/bin/download -u jawz -i";
|
||||||
gallery = ''dl "$(cat "$LW" | fzf --multi --exact -i)"'';
|
comic = ''dl "$(cat "$LC" | fzf --multi --exact -i)"'';
|
||||||
|
gallery = ''dl "$(cat "$LW" | fzf --multi --exact -i)"'';
|
||||||
|
};
|
||||||
|
initExtra = ''
|
||||||
|
list_root=$XDG_CONFIG_HOME/jawz/lists/jawz
|
||||||
|
export LW=$list_root/watch.txt
|
||||||
|
export LI=$list_root/instant.txt
|
||||||
|
export LC=$list_root/comic.txt
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
// (
|
|
||||||
if config.my.shell.type == "bash" then
|
|
||||||
{
|
|
||||||
initExtra = ''
|
|
||||||
list_root=$XDG_CONFIG_HOME/jawz/lists/jawz
|
|
||||||
export LW=$list_root/watch.txt
|
|
||||||
export LI=$list_root/instant.txt
|
|
||||||
export LC=$list_root/comic.txt
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
initContent = ''
|
|
||||||
list_root=$XDG_CONFIG_HOME/jawz/lists/jawz
|
|
||||||
export LW=$list_root/watch.txt
|
|
||||||
export LI=$list_root/instant.txt
|
|
||||||
export LC=$list_root/comic.txt
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
);
|
|
||||||
systemd.user = {
|
systemd.user = {
|
||||||
services =
|
services =
|
||||||
let
|
let
|
||||||
|
|||||||
@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
options.my.shell.type = lib.mkOption {
|
|
||||||
type = lib.types.enum [
|
|
||||||
"bash"
|
|
||||||
"zsh"
|
|
||||||
];
|
|
||||||
default = "bash";
|
|
||||||
description = "The shell to use system-wide (bash or zsh)";
|
|
||||||
};
|
|
||||||
config = {
|
|
||||||
users.users.jawz.shell = pkgs.${config.my.shell.type};
|
|
||||||
programs.zsh.enable = config.my.shell.type == "zsh";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -5,9 +5,6 @@
|
|||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
shellType = config.my.shell.type;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options.my.shell.tools.enable = lib.mkEnableOption "shell tools and utilities";
|
options.my.shell.tools.enable = lib.mkEnableOption "shell tools and utilities";
|
||||||
config = lib.mkIf config.my.shell.tools.enable {
|
config = lib.mkIf config.my.shell.tools.enable {
|
||||||
@ -19,10 +16,15 @@ in
|
|||||||
};
|
};
|
||||||
zoxide = {
|
zoxide = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableBashIntegration = shellType == "bash";
|
enableBashIntegration = true;
|
||||||
enableZshIntegration = shellType == "zsh";
|
|
||||||
};
|
};
|
||||||
${shellType} = {
|
bash = {
|
||||||
|
initExtra = ''
|
||||||
|
if command -v fzf-share >/dev/null; then
|
||||||
|
source "$(fzf-share)/key-bindings.bash"
|
||||||
|
source "$(fzf-share)/completion.bash"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
cd = "z";
|
cd = "z";
|
||||||
hh = "hstr";
|
hh = "hstr";
|
||||||
@ -35,27 +37,7 @@ in
|
|||||||
tr '[:upper:]' '[:lower:]' | sort |
|
tr '[:upper:]' '[:lower:]' | sort |
|
||||||
uniq --count | sort -rn'';
|
uniq --count | sort -rn'';
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
// (
|
|
||||||
if shellType == "bash" then
|
|
||||||
{
|
|
||||||
initExtra = ''
|
|
||||||
if command -v fzf-share >/dev/null; then
|
|
||||||
source "$(fzf-share)/key-bindings.bash"
|
|
||||||
source "$(fzf-share)/completion.bash"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
initContent = ''
|
|
||||||
if command -v fzf-share >/dev/null; then
|
|
||||||
source "$(fzf-share)/key-bindings.bash"
|
|
||||||
source "$(fzf-share)/completion.bash"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
);
|
|
||||||
bat = {
|
bat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config.pager = "less -FR";
|
config.pager = "less -FR";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user