My Nix Infra
nix nixos
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

migrate from GitHub to GitLab

ydcjeff 2e4bd904

+191
+1
.gitignore
··· 1 + .DS_Store
+21
LICENSE
··· 1 + MIT License 2 + 3 + Copyright (c) 2021-Present Jeff Yang 4 + 5 + Permission is hereby granted, free of charge, to any person obtaining a copy 6 + of this software and associated documentation files (the "Software"), to deal 7 + in the Software without restriction, including without limitation the rights 8 + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 + copies of the Software, and to permit persons to whom the Software is 10 + furnished to do so, subject to the following conditions: 11 + 12 + The above copyright notice and this permission notice shall be included in all 13 + copies or substantial portions of the Software. 14 + 15 + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 + SOFTWARE.
+18
README.md
··· 1 + # .files [![ci](https://github.com/ydcjeff/dotfiles/actions/workflows/ci.yml/badge.svg)](https://github.com/ydcjeff/dotfiles/actions/workflows/ci.yml) 2 + 3 + Includes: 4 + 5 + - Fishshell settings 6 + - [Starship shell theme](https://starship.rs) 7 + 8 + Requires: 9 + 10 + - git 11 + - fish 12 + - curl 13 + 14 + Setup: 15 + 16 + ```sh 17 + curl -fsSL https://raw.githubusercontent.com/ydcjeff/dotfiles/main/setup.sh | sh 18 + ```
+53
aliases.sh
··· 1 + #!/usr/bin/env fish 2 + 3 + # directory navigation 4 + abbr -a .. "cd .." 5 + abbr -a ... "cd ../.." 6 + abbr -a .... "cd ../../.." 7 + abbr -a ..... "cd ../../../.." 8 + 9 + # some shortcuts 10 + abbr -a c "clear" 11 + abbr -a rem "rm -rf" 12 + 13 + # npm shortcuts 14 + abbr -a n "npm" 15 + abbr -a p "pnpm" 16 + abbr -a y "yarn" 17 + 18 + # python shortcuts 19 + abbr -a py "python3" 20 + abbr -a pt "pytest" 21 + 22 + # rust shortcuts 23 + abbr -a co "cargo" 24 + 25 + # deno shortcuts 26 + abbr -a d "deno" 27 + 28 + # git shortcuts 29 + abbr -a gs "git status" 30 + abbr -a ga "git add" 31 + abbr -a gc "git commit" 32 + abbr -a gb "git branch" 33 + abbr -a gd "git diff" 34 + abbr -a gcl "git clone" 35 + abbr -a gco "git checkout" 36 + abbr -a gp "git push" 37 + abbr -a gl "git pull" 38 + abbr -a gt "git tag" 39 + abbr -a gm "git merge" 40 + abbr -a gf "git fetch" 41 + abbr -a gr "git rebase" 42 + abbr -a gg "git log --graph --pretty=format:\"%C(bold red)%h%Creset -%C(bold yellow)%d%Creset %s %C(bold green)(%cr) %C(bold blue)<%an>%Creset %C(yellow)%ad%Creset\" --abbrev-commit --date=short" 43 + abbr -a ggr "git log --reverse --pretty=format:\"%C(bold red)%h%Creset -%C(bold yellow)%d%Creset %s %C(bold green)(%cr) %C(bold blue)<%an>%Creset %C(yellow)%ad%Creset\" --abbrev-commit --date=short" 44 + 45 + # dotfiles 46 + abbr -a dot "cd ~/.dotfiles" 47 + abbr -a rl "source $FISH_CONFIG" 48 + 49 + # recursively delete .DS_Store 50 + abbr -a dds "find . -name \"*.DS_Store\" -type f -ls -delete" 51 + 52 + # recursively delete node_modules 53 + abbr -a nodemodules "find . -type d -name \"node_modules\" -exec rm -rf \"{}\" +"
+25
fishrc.sh
··· 1 + #!/usr/bin/env fish 2 + 3 + set -gx EDITOR code 4 + set -gx DOTFILES_PATH $HOME/.dotfiles 5 + set -gx XDG_CONFIG_HOME $HOME/.config 6 + set -gx XDG_CACHE_HOME $HOME/.cache 7 + set -gx STARSHIP_CONFIG $DOTFILES_PATH/starship.toml 8 + set -gx FISH_CONFIG $XDG_CONFIG_HOME/fish/config.fish 9 + set -gx TERM xterm-256color 10 + set -gx fish_color_command 00ff00 11 + 12 + fish_add_path $HOME/.cargo/bin 13 + fish_add_path $HOME/.deno/bin 14 + 15 + source $DOTFILES_PATH/aliases.sh 16 + 17 + # mac or linux 18 + switch (uname) 19 + case Linux 20 + echo "> Linux profile $FISH_CONFIG loaded." 21 + case Darwin 22 + echo "> macOS profile $FISH_CONFIG loaded." 23 + end 24 + 25 + starship init fish | source
+2
gh.ini
··· 1 + [user] 2 + email = 32727188+ydcjeff@users.noreply.github.com
+2
gl.ini
··· 1 + [user] 2 + email = 4737464-ydcjeff@users.noreply.gitlab.com
+41
setup.sh
··· 1 + #!/usr/bin/env sh 2 + 3 + set -eo pipefail 4 + 5 + has() { 6 + command -v "$1" 1>/dev/null 2>&1 7 + } 8 + 9 + # clone dotfiles 10 + if [ -d $HOME/.dotfiles ]; then 11 + echo "> .dotfiles dir exist, not cloning" 12 + else 13 + git clone https://github.com/ydcjeff/dotfiles $HOME/.dotfiles 14 + fi 15 + 16 + # install starship 17 + if has starship; then 18 + echo "> $(starship -V) exist, not installing" 19 + else 20 + curl -fsSL https://starship.rs/install.sh --output ./install.sh 21 + chmod +x ./install.sh 22 + ./install.sh -y 23 + fi 24 + 25 + # source dot files 26 + echo "> Sourcing dotfiles" 27 + mkdir -p $HOME/.config/fish 28 + echo "source $HOME/.dotfiles/fishrc.sh" > $HOME/.config/fish/config.fish 29 + fish 30 + 31 + # Some git defaults 32 + git config --global color.ui true 33 + git config --global push.default simple 34 + git config --global fetch.prune true 35 + 36 + # load github and gitlab profiles 37 + # gitdir/i is case insensitive 38 + git config --global user.name "ydcjeff" 39 + git config --global user.email "32727188+ydcjeff@users.noreply.github.com" 40 + git config --global includeIf.gitdir/i:$HOME/gh/.path $DOTFILES_PATH/gh.ini 41 + git config --global includeIf.gitdir/i:$HOME/gl/.path $DOTFILES_PATH/gl.ini
+28
starship.toml
··· 1 + format = """ 2 + $directory\ 3 + $git_branch\ 4 + $git_commit\ 5 + $git_state\ 6 + $git_status\ 7 + $line_break\ 8 + $character 9 + """ 10 + 11 + [character] 12 + success_symbol = "\\$" 13 + error_symbol = "[\\$](red)" 14 + 15 + [directory] 16 + style = "cyan" 17 + 18 + [git_branch] 19 + style = "purple" 20 + 21 + [git_commit] 22 + style = "green" 23 + 24 + [git_state] 25 + style = "yellow" 26 + 27 + [git_status] 28 + style = "red"