sdfg
This commit is contained in:
@@ -1,52 +1,16 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./fish/aliases.nix
|
||||||
|
./fish/config.nix
|
||||||
|
];
|
||||||
|
|
||||||
home.file.".config/fish/completions/flux.fish".source =
|
home.file.".config/fish/completions/flux.fish".source =
|
||||||
../../shell/completions/flux.fish;
|
../../shell/completions/flux.fish;
|
||||||
home.file.".config/fish/kube.fish".source = ../../shell/kube.fish;
|
home.file.".config/fish/kube.fish".source = ../../shell/kube.fish;
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shellInit = ''
|
|
||||||
set -gx EDITOR nvim
|
|
||||||
set -gx PNPM_HOME $HOME/.local/share/pnpm
|
|
||||||
fish_add_path $PNPM_HOME
|
|
||||||
fish_add_path $HOME/.local/bin
|
|
||||||
set -gx OPENSSL_DIR ${pkgs.openssl.dev};
|
|
||||||
set -gx KUBECONFIG $HOME/.kube/config;
|
|
||||||
set -gx OPENSSL_LIB_DIR ${pkgs.openssl.out}/lib;
|
|
||||||
set -gx OPENSSL_INCLUDE_DIR ${pkgs.openssl.dev}/include;
|
|
||||||
set -gx PKG_CONFIG_PATH ${pkgs.openssl.dev}/lib/pkgconfig;
|
|
||||||
set -x NIX_DEV_SHELL_DEFAULT_SHELL (which fish)
|
|
||||||
alias v="nvim"
|
|
||||||
alias c="clear"
|
|
||||||
alias rb="sudo nixos-rebuild switch --flake ~/nixos-config#"
|
|
||||||
alias boot-rb="sudo nixos-rebuild --install-bootloader boot --flake ~/nixos-config#"
|
|
||||||
alias clc="cloc . --exclude-dir=target,node_modules,.venv --exclude-ext=yml,yaml,csv -v"
|
|
||||||
alias dry-rb="sudo nixos-rebuild dry-build --flake ~/nixos-config#"
|
|
||||||
alias devim="NVIM_APPNAME=nvim-dev nvim"
|
|
||||||
|
|
||||||
alias win="grub-reboot 'Windows Boot Manager (on /dev/sda2)' && reboot"
|
|
||||||
|
|
||||||
alias qwer="reboot"
|
|
||||||
alias zxcv="shutdown now"
|
|
||||||
alias lg="lazygit"
|
|
||||||
|
|
||||||
function mkcd
|
|
||||||
if test (count $argv) -eq 0
|
|
||||||
echo "Usage: mkcd <directory>"
|
|
||||||
return 1
|
|
||||||
end
|
|
||||||
|
|
||||||
mkdir -p $argv[1]
|
|
||||||
and cd $argv[1]
|
|
||||||
end
|
|
||||||
|
|
||||||
funcsave mkcd
|
|
||||||
|
|
||||||
|
|
||||||
if test -f $HOME/.config/fish/kube.fish
|
|
||||||
source $HOME/.config/fish/kube.fish
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
plugins = [
|
plugins = [
|
||||||
# Enable a plugin (here grc for colorized command output) from nixpkgs
|
# Enable a plugin (here grc for colorized command output) from nixpkgs
|
||||||
{
|
{
|
||||||
@@ -65,4 +29,4 @@
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
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
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -8,6 +8,7 @@ with pkgs; [
|
|||||||
# gdb
|
# gdb
|
||||||
zap
|
zap
|
||||||
lldb
|
lldb
|
||||||
|
clang-tools
|
||||||
tokio-console
|
tokio-console
|
||||||
deno
|
deno
|
||||||
iaito
|
iaito
|
||||||
|
|||||||
@@ -71,4 +71,6 @@ with pkgs; [
|
|||||||
|
|
||||||
cudaPackages.cudatoolkit
|
cudaPackages.cudatoolkit
|
||||||
airspyhf
|
airspyhf
|
||||||
|
pstree
|
||||||
|
gptfdisk
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user