Last active
March 30, 2022 04:31
-
-
Save bdarcus/c0cff3248e3fe4bc5264a9c89d828715 to your computer and use it in GitHub Desktop.
basic post-install setup script for fedora; run w/sudo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env fish | |
| # note: fish at first glance seems much more straightforward to setup with fisher than zsh with zinit | |
| # In particular, fish works with XDG by default, while I wasted a lot of times on env variables | |
| # to get it to work with zsh + zinnit correctly. | |
| # fisher | |
| curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher | |
| # the theme options are many, but these two do async git update | |
| fisher install jorgebucaran/hydro | |
| fisher install IlanCosman/tide | |
| # git aliases | |
| fisher install jhillyerd/plugin-git | |
| # colored man pages | |
| fisher install patrickf1/colored_man_pages.fish | |
| # fzh | |
| fisher install PatrickF1/fzf.fish | |
| # maybe? | |
| fisher install b4b4r07/enhancd | |
| # done | |
| fisher install franciscolourenco/done | |
| FISH=" | |
| # can't read dircolors files directly, so ... | |
| set -gx LS_COLORS 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:' | |
| # set notification of complete process to sound | |
| set -U __done_notify_sound 1" | |
| echo ${FISH} > ~/.config/fish/config.fish |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env zsh | |
| # https://stackoverflow.com/questions/21162988/how-to-make-zsh-search-configuration-in-xdg-config-home | |
| # https://wiki.archlinux.org/index.php/XDG_Base_Directory | |
| export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:=${HOME}/.config} | |
| export ZDOTDIR=${ZDOTDIR:=${XDG_CONFIG_HOME}/zsh} | |
| # check | |
| source $ZDOTDIR/zshenv | |
| mkdir $ZDOTDIR | |
| # use zinit, as it's conceptually similar to fisher, but allows installation of zprezto, etc. plugins | |
| sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)" | |
| echo "(re)start zsh and zinit should install in ~/.config/zsh/.zinit" | |
| echo "next step ... setup .zshrc ..." | |
| # install powerlevel10k theme by adding this to zshrc | |
| # zinit ice depth=1; zinit light romkatv/powerlevel10k | |
| # powerlevel10ktheme, and set git and dnf modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # install base system, on top of btrfs; use default "auto" btrfs config, but add /var subvol | |
| # if using desktop, can install on RAID | |
| # setup nativecomp Emacs 28 package | |
| dnf copr enable deathwish/emacs-pgtk-nativecomp | |
| # rpm packages | |
| PKGS='git emacs util-linux-user zsh wget kernel-devel adobe-source-code-pro-fonts make automake npm tilix \ | |
| autoconf gcc gcc-c++ ImageMagick libpng-devel zlib-devel automatic poppler-glib-devel libicu-devel \ | |
| fontconfig-devel graphite2-devel harfbuzz-devel openssl-devel zlib-devel neovim fd-find wl-clipboard \ | |
| ripgrep ShellCheck sway waybar jetbrains-mono-fonts-all ibm-plex-fonts-all fish fzf exa' | |
| # if installing on top of a BTRFS base, and want to setup auto snapshots/dnf hooks | |
| BTR_PKGS='snapper dnf-plugins-core python3-dnf-plugins-extras-snapper' # FIX? | |
| # get packages | |
| dnf install $PKGS | |
| dnf install $BTR_PKGS | |
| chsh -s /bin/zsh | |
| # dircolors | |
| curl https://raw.githubusercontent.com/seebi/dircolors-solarized/master/dircolors.ansi-universal -o ~/.config/dircolors | |
| # if laptop | |
| # dnf install tlp tlp-rdw smartmontools | |
| ZSHENV=' | |
| if [[ -z "$XDG_CONFIG_HOME" ]] | |
| then | |
| export XDG_CONFIG_HOME="$HOME/.config" | |
| fi | |
| if [[ -d "$XDG_CONFIG_HOME/zsh" ]] | |
| then | |
| export ZDOTDIR="$XDG_CONFIG_HOME/zsh" | |
| fi | |
| ' | |
| echo ${ZSHENV} > /etc/zshenv | |
| TILIXDESK=' | |
| [Desktop Entry] | |
| Name=Tilix | |
| Comment=A tiling terminal for Gnome | |
| Keywords=shell;prompt;command;commandline;cmd; | |
| Exec=tilix --full-screen | |
| Terminal=false | |
| Type=Application | |
| StartupNotify=true | |
| Categories=System;TerminalEmulator;X-GNOME-Utilities; | |
| Icon=com.gexperts.Tilix | |
| ' | |
| echo ${TILIXDESK} > ~/.local/share/applications/com.gexperts.Tilix.desktop | |
| # global npm packages (for doom) | |
| npm install -g stylelint js-beautify | |
| # first setup ssh, github | |
| PW=$(< /dev/urandom tr -dc A-Za-z0-9 | head -c14) | |
| echo ${PW} > ~/Desktop/ssh_pw.txt | |
| # is the N switch correct? | |
| ssh-keygen -o -a 100 -N ${PW} -t ed25519 -f ~/.ssh/id_ed25519 -C "jane@example.com" # FIX | |
| wl-copy < ~/.ssh/id_ed25519.pub | |
| echo "public key copied to clipboard" | |
| # add to github, gitlab | |
| # probably split this script in two here, and separately do the rest | |
| # setup pandoc and hugo coprs, since more recent | |
| dnf copr enable petersen/pandoc | |
| # install pandoc and hugo | |
| dnf install pandoc hugo | |
| # install rust | |
| # curl https://sh.rustup.rs -sSf | sh | |
| # dnf install rust cargo | |
| # configure automatic DNF updates | |
| # systemctl enable --now dnf-automatic-install.timer | |
| # install tex | |
| dnf install texlive-scheme-medium | |
| # turning this off for now since tectonic only supports xetex, which doesn't support microtype expansion | |
| # cargo install tectonic | |
| # install Brave | |
| dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/x86_64/ | |
| rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc | |
| dnf install brave-keyring brave-browser | |
| # if photo station, also install darktable + https://displaycal.net/download/Fedora_26/x86_64/DisplayCAL.rpm | |
| # setup emacs daemon service | |
| systemctl --user enable emacs.service | |
| systemctl --user start emacs.service | |
| # install desktop integration | |
| EMACS_DESKTOP=" | |
| [Desktop Entry] | |
| Name=Emacs (Client) | |
| GenericName=Text Editor | |
| Comment=Edit text | |
| MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-t> | |
| Exec=emacsclient -a "" -c -F "((fullscreen . maximized))" | |
| Icon=emacs | |
| Type=Application | |
| Terminal=false | |
| Categories=Development;TextEditor; | |
| StartupWMClass=Emacs | |
| Keywords=Text;Editor; | |
| " | |
| echo $EMACS_DESKTOP > ~/.local/share/applications/Emacsclient.desktop | |
| # get doom | |
| git clone https://github.com/hlissner/doom-emacs ~/.config/emacs | |
| ~/.config/emacs/bin/doom install | |
| # install zotero | |
| wget https://raw.github.com/smathot/zotero_installer/master/zotero_installer.sh -O /tmp/zotero_installer.sh | |
| chmod +x /tmp/zotero_installer.sh | |
| /tmp/zotero_installer.sh | |
| # get fonts for powerlevel10k | |
| cd /tmp | |
| mkdir ~/.local/share/fonts/meslo-nerd | |
| curl -o https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf | |
| curl -o https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf | |
| curl -o https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf | |
| curl -o https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf | |
| mv ./Meslo*.ttf ~/.local/share/fonts/meslo-nerd/ | |
| cd ~/ | |
| # TODO: config doom; first setup ssh, github | |
| ## <<< | |
| echo "DONE!\n" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://git.io/JOBNY