alt getting there
This commit is contained in:
parent
08044381f6
commit
f936753dae
3 changed files with 85 additions and 0 deletions
15
alt/alias.nix
Normal file
15
alt/alias.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.shellAliases = {
|
||||||
|
htop = "btm -b";
|
||||||
|
ymd = "date +'%Y-%m-%d'";
|
||||||
|
cb = "cd $(sed 's|^file://||' /home/till/.config/gtk-3.0/bookmarks | fzf --height 10% --reverse)";
|
||||||
|
v = "nvim";
|
||||||
|
r = "R --no-save --no-restore";
|
||||||
|
R = "R --no-save --no-restore";
|
||||||
|
cdg = "cd \$(git rev-parse --show-toplevel)";
|
||||||
|
map = "telnet mapscii.me";
|
||||||
|
weather = "curl wttr.in/frankfurt";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -43,11 +43,13 @@
|
||||||
firefox
|
firefox
|
||||||
qbittorrent
|
qbittorrent
|
||||||
vlc
|
vlc
|
||||||
|
mullvad-vpn
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./desktop
|
./desktop
|
||||||
|
./alias.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.nix-index = {
|
programs.nix-index = {
|
||||||
|
|
@ -55,4 +57,18 @@
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userName = "Till";
|
||||||
|
userEmail = "till@ktiu.net";
|
||||||
|
lfs = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
extraConfig = {
|
||||||
|
init = {
|
||||||
|
defaultBranch = "main";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
54
alt/fish.nix
Normal file
54
alt/fish.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
interactiveShellInit = "fish_add_path ${config.xdg.dataHome}/npm/packages/bin";
|
||||||
|
shellInit = ''
|
||||||
|
set -gx EDITOR "nvim"
|
||||||
|
set -gx VISUAL "nvim"
|
||||||
|
|
||||||
|
function fish_greeting; end
|
||||||
|
|
||||||
|
function startrloft --description 'Starts R with custom environment'
|
||||||
|
set -lx R_ENVIRON_USER "~/.config/rloft/RLoft_environ"
|
||||||
|
R -q
|
||||||
|
end
|
||||||
|
|
||||||
|
function vd --wraps vim --description 'vim with date in filename'
|
||||||
|
nvim (ymd)_$argv.md
|
||||||
|
end
|
||||||
|
|
||||||
|
function lipsum --description 'Create placeholder text'
|
||||||
|
nix-shell -p perl536Packages.TextLorem --run 'lorem '(echo $argv)
|
||||||
|
end
|
||||||
|
|
||||||
|
set -U fish_prompt_pwd_dir_length 0
|
||||||
|
|
||||||
|
function fish_prompt --description "Write out the prompt"
|
||||||
|
echo -s (set_color brblack) (basename $PWD) (set_color normal) (set_color magenta) ' $ ' (set_color normal)
|
||||||
|
end
|
||||||
|
|
||||||
|
function fish_right_prompt --description "Display info to the right of the prompt"
|
||||||
|
echo -s (__fish_git_prompt)
|
||||||
|
end
|
||||||
|
|
||||||
|
function fish_mode_prompt; end
|
||||||
|
|
||||||
|
set fish_cursor_default line blink
|
||||||
|
|
||||||
|
set __fish_git_prompt_showdirtystate 'yes'
|
||||||
|
set __fish_git_prompt_showstashstate 'yes'
|
||||||
|
set __fish_git_prompt_showuntrackedfiles 'yes'
|
||||||
|
set __fish_git_prompt_showupstream 'yes'
|
||||||
|
set __fish_git_prompt_color_upstream_ahead green
|
||||||
|
set __fish_git_prompt_color_upstream_behind red
|
||||||
|
set __fish_git_prompt_char_dirtystate '*'
|
||||||
|
set __fish_git_prompt_char_stagedstate '→'
|
||||||
|
set __fish_git_prompt_char_untrackedfiles '☡'
|
||||||
|
set __fish_git_prompt_char_stashstate '↩'
|
||||||
|
set __fish_git_prompt_char_upstream_ahead '+'
|
||||||
|
set __fish_git_prompt_char_upstream_behind '-'
|
||||||
|
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue