sdfg
This commit is contained in:
15
modules/home/fish/aliases.nix
Normal file
15
modules/home/fish/aliases.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
programs.fish.shellAliases = {
|
||||
v = "nvim";
|
||||
c = "clear";
|
||||
rb = "sudo nixos-rebuild switch --flake ~/nixos-config#";
|
||||
"boot-rb" = "sudo nixos-rebuild --install-bootloader boot --flake ~/nixos-config#";
|
||||
clc = "cloc . --exclude-dir=target,node_modules,.venv --exclude-ext=yml,yaml,csv -v";
|
||||
"dry-rb" = "sudo nixos-rebuild dry-build --flake ~/nixos-config#";
|
||||
devim = "NVIM_APPNAME=nvim-dev nvim";
|
||||
win = "grub-reboot 'Windows Boot Manager (on /dev/sda2)' && reboot";
|
||||
qwer = "reboot";
|
||||
zxcv = "shutdown now";
|
||||
lg = "lazygit";
|
||||
};
|
||||
}
|
||||
7
modules/home/fish/config.nix
Normal file
7
modules/home/fish/config.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./env.nix
|
||||
./functions.nix
|
||||
];
|
||||
}
|
||||
18
modules/home/fish/env.nix
Normal file
18
modules/home/fish/env.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
PNPM_HOME = "$HOME/.local/share/pnpm";
|
||||
OPENSSL_DIR = "${pkgs.openssl.dev}";
|
||||
KUBECONFIG = "$HOME/.kube/config";
|
||||
OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib";
|
||||
OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include";
|
||||
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
|
||||
NIX_DEV_SHELL_DEFAULT_SHELL = "(which fish)";
|
||||
};
|
||||
|
||||
home.sessionPath = [
|
||||
"$HOME/.local/bin"
|
||||
"$PNPM_HOME"
|
||||
];
|
||||
}
|
||||
20
modules/home/fish/functions.nix
Normal file
20
modules/home/fish/functions.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
programs.fish.functions = {
|
||||
mkcd = {
|
||||
body = ''
|
||||
if test (count $argv) -eq 0
|
||||
echo "Usage: mkcd <directory>"
|
||||
return 1
|
||||
end
|
||||
|
||||
mkdir -p $argv[1]
|
||||
and cd $argv[1]
|
||||
'';
|
||||
};
|
||||
};
|
||||
programs.fish.interactiveShellInit = ''
|
||||
if test -f $HOME/.config/fish/kube.fish
|
||||
source $HOME/.config/fish/kube.fish
|
||||
end
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user