A bunch of junk you probably don’t want to waste time with. Using Nix + Flakes
Bootstrap is still WIP. Don’t actually try to use this.
- Install Nix:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
. Don’t @ me. - Start a dev shell:
nix develop github:webframp/dotfiles
- Or if cloned locally, dev shell:
nix develop .
- Run
nix run . switch -- --flake .#hostname
and watch it do stuff.- Optionally use
nix --debug run . switch -- --flake .
to get verbose output. - Non-NixOS, home-manager only configs use
home-manager switch --flake .#user@hostname
- Optionally use
Fix for “Unable to determine time zone: No such file or directory (os error 2)”
sudo timedatectl set-timezone America/New_York
sudo hwclock -s
The Windows Subsystem for Linux kernel can be manually updated with ‘wsl –update’, but automatic updates cannot occur due to your system settings. To receive automatic kernel updates, please enable the Windows Update setting: ‘Receive updates for other Microsoft products when you update Windows’. For more information please visit https://aka.ms/wsl2kernel.
Install
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex
Packages
scoop bucket add extras
scoop bucket add nerd-fonts
scoop install 7zip audacity aws bat cpu-z dark discord dotnet-sdk firefox fzf git git-credential-manager go helm Inconsolata-NF-Mono Iosevka-NF-Mono jq less neofetch neovim powertoys quicklook ripgrep signal slack spotify starship steam teamviewer terraform vcredist2022 vscode win32yank zoom zoxide
Install powershell + profile
winget install --id Microsoft.Powershell --source winget # restart terminal code $PROFILE
???
???
Use ed25519 already.
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "use@machine: detail"
TODO Setup doom
git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.config/emacs
~/.config/emacs/bin/doom install
Clone org repo into ~/org
After GPG setup, clone password store repo from backup drive, run:
chown -R $(whoami) ~/.gnupg/
find ~/.gnupg -type f -exec chmod 600 {} \;
find ~/.gnupg -type d -exec chmod 700 {} \;
Super minimal .bash_profile that most uses nixos defaults
#!/usr/bin/env bash
#
# ensure defaults are loaded
if test -f /etc/bashrc; then
. /etc/bashrc
fi
# Pass
alias qp='pass -c "$(find -L "$HOME/.password-store" \( -name .git\* -o -name .gpg-id \) -prune -o $@ -print 2>/dev/null | sed -e "s#${HOME}/.password-store/\{0,1\}##" -e 's#\.gpg##'|sort|fzf)"'
alias qpo='pass otp -c "$(find -L "$HOME/.password-store" \( -name .git\* -o -name .gpg-id \) -prune -o $@ -print 2>/dev/null | sed -e "s#${HOME}/.password-store/\{0,1\}##" -e 's#\.gpg##'|sort|fzf)"'
alias qpe='EDITOR=vim pass edit "$(find -L "$HOME/.password-store" \( -name .git\* -o -name .gpg-id \) -prune -o $@ -print 2>/dev/null | sed -e "s#${HOME}/.password-store/\{0,1\}##" -e 's#\.gpg##'|sort|fzf)"'
The 24bit color config depends on a custom terminfo file in this repo. Still need to find a way to build this for systemwide config with nix.
Unclear if this is useful yet: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/config/terminfo.nix
For now this is handled per user automatically using home-manager in home/sme/global/default.nix
with:
home.file.".xterm-24bit.terminfo" = {
source = ./includes/xterm-24bit.terminfo;
onChange = "tic -x -o ~/.terminfo ~/.xterm-24bit.terminfo";
};
/usr/bin/tic -x -o ~/.terminfo xterm-24bit.terminfo
export TERM=xterm-24bit
alias ssh="TERM=xterm-256color ssh" # maybe needed
Add to tmux config
set -g default-terminal "xterm-24bit"
set -g terminal-overrides ',xterm-24bit:Tc'
Also make sure locale vars are set correctly
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
- https://zero-to-nix.com/
- https://github.com/Misterio77/nix-starter-configs
- https://github.com/nix-community/NixOS-WSL
- https://www.chrisportela.com/posts/home-manager-flake/
- https://gvolpe.com/blog/nix-flakes/
- https://nix-community.github.io/home-manager/options.html
- https://medium.com/risan/upgrade-your-ssh-key-to-ed25519-c6e8d60d3c54
- https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/
- https://github.com/syl20bnr/spacemacs/wiki/Terminal
- a bug I also hit