My Nix Infra
nix nixos
0
fork

Configure Feed

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

arch setup

+349 -37
+2 -2
config.fish
··· 1 1 set -gx EDITOR nvim 2 + set -gx BROWSER firefox 2 3 set -gx DOTFILES_PATH $HOME/.dotfiles 3 4 set -gx XDG_CONFIG_HOME $HOME/.config 4 5 set -gx XDG_CACHE_HOME $HOME/.cache 5 - set -gx STARSHIP_CONFIG $DOTFILES_PATH/starship.toml 6 6 set -gx FISH_CONFIG $XDG_CONFIG_HOME/fish/config.fish 7 7 set -gx PNPM_HOME $HOME/.local/share/pnpm 8 8 set -gx TERM xterm-256color ··· 14 14 fish_add_path $HOME/.local/bin 15 15 fish_add_path $HOME/go/bin 16 16 17 - source $DOTFILES_PATH/abbr.fish 17 + source (dirname (status --current-filename))/abbr.fish 18 18 19 19 # mac or linux 20 20 switch (uname)
+5
config/environment.d/fcitx.conf
··· 1 + INPUT_METHOD=fcitx 2 + GTK_IM_MODULE=fcitx 3 + QT_IM_MODULE=fcitx 4 + XMODIFIERS=@im=fcitx 5 + SDL_IM_MODULE=fcitx
+2
config/environment.d/ssh_askpass.conf
··· 1 + SSH_ASKPASS=/usr/bin/ksshaskpass 2 + SSH_ASKPASS_REQUIRE=prefer
+59
config/fish/abbr.fish
··· 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 p "pnpm" 15 + 16 + # python shortcuts 17 + abbr -a py "python3" 18 + abbr -a pt "pytest" 19 + 20 + # rust shortcuts 21 + abbr -a co "cargo" 22 + 23 + # deno shortcuts 24 + abbr -a d "deno" 25 + 26 + # git shortcuts 27 + abbr -a gs "git status" 28 + abbr -a ga "git add" 29 + abbr -a gc "git commit" 30 + abbr -a gb "git branch" 31 + abbr -a gd "git diff" 32 + abbr -a gcl "git clone" 33 + abbr -a gco "git checkout" 34 + abbr -a gp "git push" 35 + abbr -a gl "git pull" 36 + abbr -a gt "git tag" 37 + abbr -a gm "git merge" 38 + abbr -a gf "git fetch" 39 + abbr -a gr "git rebase" 40 + 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" 41 + 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" 42 + 43 + # dotfiles 44 + abbr -a dot "cd $HOME/.dotfiles" 45 + abbr -a rl "source $FISH_CONFIG" 46 + 47 + # recursively delete .DS_Store 48 + abbr -a dds "find . -name \"*.DS_Store\" -type f -ls -delete" 49 + 50 + # recursively delete node_modules 51 + abbr -a nodemodules "find . -type d -name \"node_modules\" -exec rm -rf \"{}\" +" 52 + abbr -a pycache "find . -type d -name \"__pycache__\" -exec rm -rf \"{}\" +" 53 + 54 + # alias 55 + alias vim="nvim" 56 + 57 + # CC VPN 58 + alias ccvpnt="sudo openfortivpn ccvpn.it.cs.nycu.edu.tw:443 --realm test" 59 + alias ccvpnp="sudo openfortivpn ccvpn.it.cs.nycu.edu.tw:443 --realm prod"
+27
config/fish/config.fish
··· 1 + set -gx EDITOR nvim 2 + set -gx BROWSER firefox 3 + set -gx DOTFILES_PATH $HOME/.dotfiles 4 + set -gx XDG_CONFIG_HOME $HOME/.config 5 + set -gx XDG_CACHE_HOME $HOME/.cache 6 + set -gx FISH_CONFIG $XDG_CONFIG_HOME/fish/config.fish 7 + set -gx PNPM_HOME $HOME/.local/share/pnpm 8 + set -gx TERM xterm-256color 9 + set -gx fish_color_command 00ff00 10 + set -gx fish_greeting 11 + 12 + fish_add_path $HOME/.composer/vendor/bin 13 + fish_add_path $PNPM_HOME 14 + fish_add_path $HOME/.local/bin 15 + fish_add_path $HOME/go/bin 16 + 17 + source (dirname (status --current-filename))/abbr.fish 18 + 19 + # mac or linux 20 + switch (uname) 21 + case Linux 22 + echo "> Linux profile $FISH_CONFIG loaded." 23 + case Darwin 24 + echo "> macOS profile $FISH_CONFIG loaded." 25 + end 26 + 27 + starship init fish | source
+5
config/git/gitconfig-cc
··· 1 + [core] 2 + hookspath = ~/cc/www/githooks 3 + [user] 4 + name = De-Cheng Yang 5 + email = dcyang@cs.nctu.edu.tw
-7
gitconfig-csit
··· 1 - [core] 2 - hookspath = ~/cc/www/githooks 3 - [user] 4 - name = De-Cheng Yang 5 - email = dcyang@cs.nctu.edu.tw 6 - [credential "https://gitlab.it.cs.nycu.edu.tw"] 7 - helper = "/usr/bin/glab auth git-credential"
+11
install/1-paru.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + set -e 4 + 5 + if ! command -v paru &> /dev/null; then 6 + sudo pacman -S --needed base-devel git 7 + git clone https://aur.archlinux.org/paru-bin.git /tmp/paru 8 + cd /tmp/paru 9 + makepkg -si --noconfirm 10 + rm -rf /tmp/paru 11 + fi
+112
install/2-pkgs.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + set -e 4 + 5 + has() { 6 + command -v "$1" &> /dev/null 7 + } 8 + 9 + pkgs=( 10 + # kde plasma ofc 11 + plasma 12 + 13 + # common devtools 14 + bat 15 + coreutils 16 + fastfetch 17 + fd # find alternative 18 + fish 19 + fzf 20 + starship 21 + tree 22 + openssh 23 + openssl 24 + rsync 25 + just 26 + man 27 + man-db 28 + 29 + # network tools 30 + bind 31 + curl 32 + mtr 33 + wget 34 + tcpdump 35 + 36 + # process monitoring 37 + btop 38 + 39 + # vcs 40 + git 41 + github-cli 42 + glab 43 + 44 + # text processing 45 + jq 46 + 47 + # archive 48 + unzip 49 + zip 50 + 51 + # encryption and security 52 + age 53 + gnupg 54 + 55 + # terminal 56 + ghostty 57 + 58 + # editors 59 + nano 60 + neovim 61 + visual-studio-code-bin 62 + brave-bin 63 + 64 + # vpn 65 + openfortivpn 66 + 67 + # fonts 68 + noto-fonts 69 + noto-fonts-cjk 70 + noto-fonts-emoji 71 + noto-fonts-extra 72 + ttf-jetbrains-mono 73 + ttf-font-awesome 74 + 75 + # containers 76 + docker 77 + podman 78 + toolbox 79 + 80 + # virtualization 81 + virtualbox 82 + 83 + # IME 84 + fcitx5-im 85 + fcitx5-rime 86 + 87 + discord 88 + telegram-desktop 89 + ) 90 + 91 + if ! has smerge; then 92 + curl -O https://download.sublimetext.com/sublimehq-pub.gpg && sudo pacman-key --add sublimehq-pub.gpg && sudo pacman-key --lsign-key 8A8F901A && rm sublimehq-pub.gpg 93 + echo -e "\n[sublime-text]\nServer = https://download.sublimetext.com/arch/stable/x86_64" | sudo tee -a /etc/pacman.conf 94 + pkgs+=(sublime-merge) 95 + fi 96 + 97 + paru -Syu --noconfirm --needed ${pkgs[@]} 98 + 99 + if ! has uv; then 100 + # uv 101 + curl -LsSf https://astral.sh/uv/install.sh | sh 102 + fi 103 + 104 + if ! has pnpm; then 105 + # pnpm 106 + curl -fsSL https://get.pnpm.io/install.sh | sh 107 + fi 108 + 109 + if ! has node; then 110 + source "$HOME"/.bashrc 111 + pnpm env use --global lts 112 + fi
+23
install/dotconfig.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + set -e 4 + 5 + mkdir -p "$HOME"/.config 6 + cp -r "$HOME"/.dotfiles/config/* "$HOME"/.config 7 + 8 + # git defaults 9 + git config --global color.ui true 10 + git config --global push.default simple 11 + git config --global fetch.prune true 12 + git config --global pull.rebase true 13 + git config --global user.name "ydcjeff" 14 + git config --global user.email "n2ya@duck.com" 15 + git config --global core.editor "nvim" 16 + git config --global init.defaultBranch main 17 + git config --global includeIf.gitdir/i:"$HOME"/cc/.path "$HOME"/.config/git/gitconfig-cc 18 + 19 + # shell completions 20 + mkdir -p "$HOME"/.config/fish/completions 21 + pnpm completion fish > "$HOME"/.config/fish/completions/pnpm.fish 22 + echo 'uv generate-shell-completion fish | source' > "$HOME"/.config/fish/completions/uv.fish 23 + echo 'uvx --generate-shell-completion fish | source' > "$HOME"/.config/fish/completions/uvx.fish
+92
install/kde-config.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + set -e 4 + 5 + backup() { 6 + cp "$1" "$1"-$(date -Iseconds).bak 7 + } 8 + 9 + kwc() { 10 + file=$1 11 + group=$2 12 + key=$3 13 + value=$4 14 + type={$5:-""} 15 + backup $file 16 + kwriteconfig6 \ 17 + --file "$file" \ 18 + --group "$group" \ 19 + --key "$key" \ 20 + --type "$type" \ 21 + "$value" 22 + } 23 + 24 + echo "highlight changed settings" 25 + kwc "$HOME"/.config/systemsettingsrc \ 26 + systemsettings_sidebar_mode \ 27 + HighlightNonDefaultSettings \ 28 + true \ 29 + bool 30 + 31 + echo "set fcitx5 IME" 32 + kwc "$HOME"/.config/kwinrc \ 33 + Wayland \ 34 + 'InputMethod[$e]' \ 35 + '/usr/share/applications/org.fcitx.Fcitx5.desktop' 36 + kwc "$HOME"/.config/kwinrc \ 37 + Wayland \ 38 + 'VirtualKeyboardEnabled' \ 39 + true \ 40 + bool 41 + 42 + echo "set kwin shortcuts" 43 + kwc "$HOME"/.config/kglobalshortcutsrc \ 44 + kwin \ 45 + 'Window Close' \ 46 + 'Alt+F4\tAlt+Q,Alt+F4,Close Window' 47 + kwc "$HOME"/.config/kglobalshortcutsrc \ 48 + kwin \ 49 + 'Window Maximize' \ 50 + 'Meta+F\tMeta+PgUp,Meta+PgUp,Maximize Window' 51 + kwc "$HOME"/.config/kglobalshortcutsrc \ 52 + kwin \ 53 + 'Window Quick Tile Bottom' \ 54 + 'Meta+J\tMeta+Down,Meta+Down,Quick Tile Window to the Bottom' 55 + kwc "$HOME"/.config/kglobalshortcutsrc \ 56 + kwin \ 57 + 'Window Quick Tile Left' \ 58 + 'Meta+H\tMeta+Left,Meta+Left,Quick Tile Window to the Left' 59 + kwc "$HOME"/.config/kglobalshortcutsrc \ 60 + kwin \ 61 + 'Window Quick Tile Right' \ 62 + 'Meta+L\tMeta+Right,Meta+Right,Quick Tile Window to the Right' 63 + kwc "$HOME"/.config/kglobalshortcutsrc \ 64 + kwin \ 65 + 'Window Quick Tile Top' \ 66 + 'Meta+K\tMeta+Up,Meta+Up,Quick Tile Window to the Top' 67 + kwc "$HOME"/.config/kglobalshortcutsrc \ 68 + ksmserver \ 69 + Lock Session \ 70 + 'Ctrl+Alt+L\tScreensaver,Meta+L\tScreensaver,Lock Session' 71 + 72 + echo "disable file indexing" 73 + kwc "$HOME"/.config/baloofilerc \ 74 + 'Basic Settings' \ 75 + 'Indexing-Enabled' \ 76 + false \ 77 + bool 78 + kwc "$HOME"/.config/krunnerrc \ 79 + 'Plugins' \ 80 + 'baloosearchEnabled' \ 81 + false \ 82 + bool 83 + 84 + echo "set default apps" 85 + kwc "$HOME"/.config/kdeglobals \ 86 + 'General' \ 87 + 'TerminalApplication' \ 88 + ghostty 89 + kwc "$HOME"/.config/kdeglobals \ 90 + 'General' \ 91 + 'TerminalService' \ 92 + com.mitchellh.ghostty.desktop
+8
install/mkdirs.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + set -e 4 + 5 + mkdir -p "$HOME"/cc/{www,mail} 6 + mkdir -p "$HOME"/w 7 + mkdir -p "$HOME"/p 8 + mkdir -p "$HOME"/s
+3 -28
setup.sh
··· 1 1 #!/usr/bin/env bash 2 2 3 - set -eo pipefail 4 - 5 - has() { 6 - command -v "$1" >/dev/null 2>&1 7 - } 3 + set -e 8 4 9 5 # clone dotfiles 10 - if [ -d "$HOME"/.dotfiles ]; then 6 + if [[ -d "$HOME"/.dotfiles ]]; then 11 7 echo "> .dotfiles dir exist, not cloning" 12 8 else 13 9 git clone https://gitlab.com/ydcjeff/dotfiles "$HOME"/.dotfiles 14 10 fi 15 11 16 - # install starship 17 - if has starship; then 18 - echo "> $(starship -V) exist, not installing" 19 - else 20 - curl -sS https://starship.rs/install.sh | sh 21 - fi 22 - 23 - # source dot files 24 - echo "> Sourcing dotfiles" 25 - mkdir -p "$HOME"/.config/fish 26 - ln -sf "$HOME"/.dotfiles/config.fish "$HOME"/.config/fish/config.fish 27 - 28 - # git defaults 29 - git config --global color.ui true 30 - git config --global push.default simple 31 - git config --global fetch.prune true 32 - git config --global pull.rebase true 33 - git config --global user.name "ydcjeff" 34 - git config --global user.email "n2ya@duck.com" 35 - git config --global core.editor "nvim" 36 - git config --global init.defaultBranch main 37 - git config --global includeIf.gitdir/i:"$HOME"/cc/.path "$HOME"/.dotfiles/gitconfig-csit 12 + for f in "$HOME"/.dotfiles/install/*.sh; do source "$f"; done
starship.toml config/starship/starship.toml