oxidizing
This commit is contained in:
parent
a46356a178
commit
a9eadc52f3
35 changed files with 726 additions and 1223 deletions
46
home/modules/shell/config.nu
Normal file
46
home/modules/shell/config.nu
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
if "ZELLIJ" in $env == false {
|
||||
zellij
|
||||
exit
|
||||
}
|
||||
|
||||
def rebuild [message?: string] {
|
||||
cd /home/maxag/.nix-config
|
||||
let commit_message = if $message != null {$message} else {"non important commit"}
|
||||
try {
|
||||
git pull
|
||||
git add .
|
||||
git commit -m $commit_message
|
||||
git push
|
||||
}
|
||||
sudo nixos-rebuild switch --flake .
|
||||
}
|
||||
|
||||
def --env fzf-cd [] {
|
||||
let dir = (fd -t d -L . | fzf --reverse --height 40% --border rounded --preview=("eza --color=always --group-directories-first --icons --long {}") --preview-window=border-left)
|
||||
if $dir != null and $dir != "" {
|
||||
cd $dir
|
||||
}
|
||||
}
|
||||
|
||||
def --env fzf-nvim [] {
|
||||
let file = (fd -t f -L . | fzf --reverse --height 40% --border rounded --preview=("bat -p -P --color always {}") --preview-window=border-left)
|
||||
if $file != null and $file != "" {
|
||||
nvim $file
|
||||
}
|
||||
}
|
||||
|
||||
$env.config.keybindings = ($env.config.keybindings | append {
|
||||
name: "fzf-cd"
|
||||
modifier: "control"
|
||||
keycode: "char_f"
|
||||
mode: "emacs"
|
||||
event: [{ send: "executehostcommand" cmd: 'fzf-cd' }]
|
||||
})
|
||||
|
||||
$env.config.keybindings = ($env.config.keybindings | append {
|
||||
name: "fzf-nvim"
|
||||
modifier: "control"
|
||||
keycode: "char_e"
|
||||
mode: "emacs"
|
||||
event: [{ send: "executehostcommand" cmd: 'fzf-nvim' }]
|
||||
})
|
||||
93
home/modules/shell/shell.nix
Normal file
93
home/modules/shell/shell.nix
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
{
|
||||
pkgs,
|
||||
device-name,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
bat
|
||||
fzf
|
||||
fd
|
||||
eza
|
||||
btop
|
||||
man-pages
|
||||
inputs.floatc.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
PAGER = "bat -l man";
|
||||
MANPAGER = "bat -l man";
|
||||
};
|
||||
|
||||
programs = {
|
||||
bash.enable = true;
|
||||
fzf.enable = true;
|
||||
eza.enable = true;
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
silent = true;
|
||||
nix-direnv .enable = true;
|
||||
};
|
||||
|
||||
nushell = {
|
||||
enable = true;
|
||||
|
||||
extraConfig = builtins.readFile "config.nu";
|
||||
|
||||
settings = {
|
||||
show_banner = false;
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
system = "nvim /home/maxag/.nix-config/flake.nix";
|
||||
home = "nvim /home/maxag/.nix-config/home/${device-name}/home.nix";
|
||||
cat = "bat -p -P";
|
||||
nix-shell = "nix-shell --run nu";
|
||||
garbage = " sudo nix-collect-garbage --delete-old";
|
||||
c = "clear";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
enableBashIntegration = false;
|
||||
settings = {
|
||||
on_force_close = "quit";
|
||||
simplified_ui = true;
|
||||
pane_frames = false;
|
||||
default_layout = "compact";
|
||||
show_startup_tips = false;
|
||||
};
|
||||
};
|
||||
|
||||
gtk.enable = true;
|
||||
qt.enable = true;
|
||||
|
||||
programs = {
|
||||
btop.enable = true;
|
||||
|
||||
foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
term = "xterm-256color";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
package = pkgs.gitFull;
|
||||
settings = {
|
||||
user.name = "Jiří Maxmilián Stříbrný";
|
||||
user.email = "max.stribrny@gmail.com";
|
||||
init.defaultBranch = "main";
|
||||
push.autoSetupRemote = true;
|
||||
github.user = "maxstrb";
|
||||
credential.helper = "store";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue