# Generate SSH key (and then need to register public key to GitHub)
$ mkdir -p ~/.ssh/github.com && \
ssh-keygen -t rsa -b 4096 -C nokazn@gmail.com -f ~/.ssh/github.com/id_rsa -N "" && \
cat ~/.ssh/github.com/id_rsa.pub
$ curl https://raw.githubusercontent.com/nokazn/dotfiles/main/unix/.ssh/config > ~/.ssh/config
$ ssh -T github.com
$ sudo tee /etc/wsl.conf <<EOF
[user]
default = nokazn
EOF
$ sudo mkdir -p /etc/nix && sudo tee /etc/nix/nix.conf <<EOF
experimental-features = nix-command flakes
EOF
# Ubuntu/Debian
$ sudo apt update -y && sudo apt upgrade -y && sudo apt install -y git make wget curl
# Arch Linux
$ sudo pacman -Syu && sudo pacman -S base base-devel vi vim git make wget openssh
make init/user
command executes targets below.
add-tools/nix
- add Nixapply/user
- runhome-manager switch
install/proto-langs
- install some languages & tools by proto
$ git clone git@github.com:nokazn/dotfiles ~/dotfiles
$ cd ~/dotfiles
# Install all development tools & language runtime
$ make init/user
# For WSL environment (optional)
$ make apply/windows
install apps for Windows
# After running `apply/windows` in WSL environment, run the following script in powershell
.\.scripts\apply.ps1
Install apps for Linux
./scripts/flatpak.sh
make init/darwin
command executes targets below.
add-tools/nix
- add Nixapply/darwin
- runnix-darwin switch
install/proto-langs
- install some languages & tools by proto
$ git clone git@github.com:nokazn/dotfiles ~/dotfiles
$ cd ~/dotfiles
# Install all development tools & language runtime & homebrew apps
$ make init/darwin
# `chshs` is an alias for `chsh -s`
$ chshs zsh
# Add wsl-hello-sudo
$ make add-tools/wsl-hello-sudo
After installing wsl-hello-sudo, you need to modify /etc/pam.d/sudo
.
+ auth sufficient pam_wsl_hello.so
See wsl-hello-sudo document for configuration for details.
sudo chmod +w /etc/pam.d/sudo
sudo vim /etc/pam.d/sudo
# sudo: auth account password session
+ auth sufficient pam_tid.so
auth include sudo_local
auth sufficient pam_smartcard.so
auth required pam_opendirectory.so
account required pam_permit.so
password required pam_deny.so
session required pam_permit.so
sudo chmod -w /etc/pam.d/sudo
# Login to keybase
$ keybase login
# If no service
$ keybase --standalone login
$ keybase config set -b pinentry.disabled 1
# Import a public key
$ keybase pgp export | gpg --import
# Import multiple public keys
$ keybase pgp export -q <ID> | gpg --import
# Import a secret key
$ keybase pgp export --secret | gpg --allow-secret-key-import --import