2022-05-10 13:58:50 -04:00
|
|
|
# ZFS encrypted home
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# create key, as root
|
|
|
|
dd if=/dev/urandom of=/etc/zfs/home.key bs=32 count=1 && chmod 600 /etc/zfs/home.key
|
|
|
|
# create pool
|
|
|
|
zpool create storage -O xattr=sa -O acltype=posixacl -O atime=off -O compression=lz4 -o ashift=12 /dev/DISK
|
|
|
|
# create home dataset
|
|
|
|
zfs create -O encryption=aes-256-gcm -O keyformat=raw -O keylocation=file:///etc/zfs/home.key -o mountpoint=/home storage/home
|
|
|
|
# create individual dataset
|
|
|
|
zfs create storage/home/andrew
|
|
|
|
|
|
|
|
# enable zfs load key from file at boot
|
|
|
|
cat <<EOF > /etc/systemd/system/zfs-load-key.service
|
|
|
|
[Unit]
|
|
|
|
Description=Load encryption keys
|
|
|
|
DefaultDependencies=no
|
|
|
|
After=zfs-import.target
|
|
|
|
Before=zfs-mount.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
|
|
|
RemainAfterExit=yes
|
|
|
|
ExecStart=/usr/sbin/zfs load-key -a
|
|
|
|
StandardInput=tty-force
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=zfs-mount.service
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# turn on services
|
|
|
|
systemctl enable zfs.target
|
|
|
|
systemctl enable zfs-import-cache
|
|
|
|
systemctl enable zfs-mount
|
|
|
|
systemctl enable zfs-import.target
|
|
|
|
systemctl enable zfs-load-key
|
|
|
|
```
|
|
|
|
|
|
|
|
# Arch / Manjaro
|
|
|
|
|
|
|
|
```bash
|
|
|
|
pacman-mirrors --geoip
|
|
|
|
pamac install linux-api-headers linux-headers
|
|
|
|
pamac install zfs-dkms
|
|
|
|
zpool import -f storage
|
|
|
|
zpool set cachefile=/etc/zfs/zpool.cache storage
|
|
|
|
pamac install \
|
|
|
|
atuin \
|
|
|
|
base-devel \
|
|
|
|
bash-completion \
|
|
|
|
bat \
|
|
|
|
bottom \
|
2022-05-24 10:01:02 -04:00
|
|
|
cargo-flamegraph \
|
|
|
|
choose \
|
|
|
|
broot \
|
|
|
|
croc \
|
|
|
|
difftastic \
|
2022-05-10 13:58:50 -04:00
|
|
|
direnv \
|
|
|
|
dust \
|
|
|
|
exa \
|
|
|
|
fd \
|
|
|
|
fzf \
|
|
|
|
git \
|
|
|
|
git-delta \
|
|
|
|
gitui \
|
|
|
|
glances \
|
2022-06-30 12:48:26 -04:00
|
|
|
gnome-screenshot \
|
2022-05-10 13:58:50 -04:00
|
|
|
go \
|
2022-05-24 10:01:02 -04:00
|
|
|
grex \
|
2022-05-10 13:58:50 -04:00
|
|
|
hdparm \
|
|
|
|
hexyl \
|
2022-05-24 10:01:02 -04:00
|
|
|
htmlq \
|
2022-05-10 13:58:50 -04:00
|
|
|
htop \
|
|
|
|
httpie \
|
|
|
|
jq \
|
|
|
|
kitty \
|
|
|
|
libvirt \
|
|
|
|
lzop \
|
|
|
|
lsd \
|
2022-05-24 10:01:02 -04:00
|
|
|
mdbook \
|
|
|
|
mdbook-linkcheck \
|
2022-05-10 13:58:50 -04:00
|
|
|
mhash \
|
|
|
|
mosh \
|
2022-05-24 10:01:02 -04:00
|
|
|
mtr \
|
2022-05-10 13:58:50 -04:00
|
|
|
neovim \
|
2022-05-24 10:01:02 -04:00
|
|
|
nextcloud-client \
|
2022-05-10 13:58:50 -04:00
|
|
|
nmon \
|
|
|
|
opendoas \
|
2022-05-24 10:01:02 -04:00
|
|
|
pgcli \
|
2022-05-10 13:58:50 -04:00
|
|
|
pv \
|
2022-05-24 10:01:02 -04:00
|
|
|
p7zip \
|
2022-05-10 13:58:50 -04:00
|
|
|
qemu \
|
|
|
|
ripgrep \
|
2022-05-24 10:01:02 -04:00
|
|
|
sd \
|
2022-05-10 13:58:50 -04:00
|
|
|
shfmt \
|
|
|
|
starship \
|
|
|
|
tealdeer \
|
|
|
|
tmux \
|
2022-05-24 10:01:02 -04:00
|
|
|
tokei \
|
2022-05-10 15:34:34 -04:00
|
|
|
unzip \
|
2022-05-10 13:58:50 -04:00
|
|
|
vim \
|
|
|
|
virt-manager \
|
2022-05-24 10:01:02 -04:00
|
|
|
watchexec \
|
|
|
|
xh \
|
|
|
|
xsv \
|
2022-05-10 13:58:50 -04:00
|
|
|
zoxide
|
2022-07-05 08:51:29 -04:00
|
|
|
# for pop_os
|
|
|
|
doas apt install -y \
|
|
|
|
hyperfine \
|
|
|
|
just
|
|
|
|
# others
|
|
|
|
cargo install \
|
|
|
|
just \
|
|
|
|
hyperfine
|
2022-05-10 13:58:50 -04:00
|
|
|
# not available by default
|
|
|
|
#jc mbuffer
|
|
|
|
pamac build lightly-qt
|
2022-05-11 08:14:30 -04:00
|
|
|
systemctl enable --now --user ssh-agent.service
|
2022-05-10 13:58:50 -04:00
|
|
|
```
|
|
|
|
|
2022-06-29 13:30:20 -04:00
|
|
|
# Ubuntu / Pop_OS!
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo apt install -y \
|
|
|
|
build-essential \
|
|
|
|
curl \
|
|
|
|
cmake \
|
|
|
|
direnv \
|
|
|
|
doas \
|
|
|
|
fzf \
|
|
|
|
git \
|
|
|
|
glances \
|
|
|
|
golang \
|
|
|
|
hdparm \
|
|
|
|
htop \
|
|
|
|
httpie \
|
|
|
|
hyperfine \
|
|
|
|
jq \
|
|
|
|
just \
|
|
|
|
kitty-terminfo \
|
2022-06-30 09:48:17 -04:00
|
|
|
libmhash2 \
|
|
|
|
libssl-dev \
|
2022-06-29 13:30:20 -04:00
|
|
|
libvirt-daemon \
|
|
|
|
lzop \
|
|
|
|
most \
|
|
|
|
mosh \
|
|
|
|
mtr \
|
|
|
|
nmon \
|
|
|
|
openssh-server \
|
|
|
|
pgcli \
|
|
|
|
pv \
|
|
|
|
p7zip \
|
|
|
|
ripgrep \
|
|
|
|
shfmt \
|
|
|
|
steam-devices \
|
|
|
|
tmux \
|
|
|
|
unzip \
|
|
|
|
vim \
|
|
|
|
virt-manager \
|
|
|
|
zoxide \
|
|
|
|
zfs-dkms \
|
|
|
|
zfsutils-linux
|
|
|
|
systemctl enable --now sshd.service
|
2022-06-30 09:48:17 -04:00
|
|
|
systemctl enable zfs.target
|
|
|
|
systemctl enable zfs-import-cache
|
|
|
|
systemctl enable zfs-mount
|
|
|
|
systemctl enable zfs-import.target
|
|
|
|
curl -Lo /tmp/nvim-linux64.deb https://github.com/neovim/neovim/releases/download/v0.7.2/nvim-linux64.deb && doas apt install -y /tmp/nvim-linux64.deb && rm -f /tmp/nvim-linux64.deb
|
|
|
|
go install github.com/schollz/croc/v9@latest
|
|
|
|
cargo install \
|
|
|
|
atuin \
|
|
|
|
bat \
|
|
|
|
bottom \
|
|
|
|
broot \
|
|
|
|
choose \
|
|
|
|
difftastic \
|
|
|
|
du-dust \
|
|
|
|
exa \
|
|
|
|
fd-find \
|
|
|
|
flamegraph \
|
|
|
|
git-delta \
|
|
|
|
gitui \
|
|
|
|
grex \
|
|
|
|
hexyl \
|
|
|
|
htmlq \
|
|
|
|
sd \
|
|
|
|
starship \
|
|
|
|
tealdeer \
|
|
|
|
tokei \
|
|
|
|
watchexec-cli \
|
|
|
|
xh \
|
|
|
|
xsv
|
|
|
|
curl -LO https://github.com/owenthereal/upterm/releases/download/v0.9.0/upterm_linux_amd64.tar.gz
|
2022-06-29 13:30:20 -04:00
|
|
|
```
|
|
|
|
|
2022-05-10 14:01:42 -04:00
|
|
|
# Bitwarden
|
|
|
|
|
|
|
|
```bash
|
2022-05-10 15:34:34 -04:00
|
|
|
curl -Lo bw.zip 'https://vault.bitwarden.com/download/?app=cli&platform=linux'
|
|
|
|
unzip bw.zip
|
|
|
|
mkdir -p "$HOME/.local/bin" "$HOME/.config/bash"
|
|
|
|
install -m 755 bw "$HOME/.local/bin/"
|
|
|
|
rm -f bw bw.zip
|
2022-05-10 14:01:42 -04:00
|
|
|
bw config server https://bitwarden.penguincoder.org
|
|
|
|
bw login
|
|
|
|
echo "export BW_SESSION=$(bw unlock --raw)" > "$HOME/.config/bash/bitwarden.sh"
|
|
|
|
source "$HOME/.config/bash/bitwarden.sh"
|
2022-05-10 15:34:34 -04:00
|
|
|
bw sync
|
2022-05-10 14:01:42 -04:00
|
|
|
```
|
|
|
|
|
2022-05-10 13:58:50 -04:00
|
|
|
# Kitty
|
|
|
|
|
|
|
|
```bash
|
|
|
|
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
|
2022-06-29 13:30:20 -04:00
|
|
|
mkdir -p "$HOME/.local/bin"
|
2022-05-10 13:58:50 -04:00
|
|
|
ln -s "$HOME/.local/kitty.app/bin/kitty" "$HOME/.local/bin/"
|
|
|
|
cp "$HOME/.local/kitty.app/share/applications/kitty.desktop" "$HOME/.local/share/applications/"
|
|
|
|
cp "$HOME/.local/kitty.app/share/applications/kitty-open.desktop" "$HOME/.local/share/applications/"
|
2022-06-29 13:30:20 -04:00
|
|
|
sed -i "s|Icon=kitty|Icon=$HOME/.local/kitty.app/share/icons/hicolor/256x256/apps/kitty.png|g" $HOME/.local/share/applications/kitty*.desktop
|
2022-05-10 13:58:50 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
# Nix
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sh <(curl -L https://nixos.org/nix/install) --daemon
|
|
|
|
```
|
|
|
|
|
|
|
|
# Rust
|
|
|
|
|
|
|
|
```bash
|
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
2022-07-05 08:51:29 -04:00
|
|
|
source .cargo/env
|
|
|
|
rustup install nightly
|
2022-05-10 13:58:50 -04:00
|
|
|
```
|
|
|
|
|
2022-05-24 10:01:02 -04:00
|
|
|
# Cargo dependencies
|
|
|
|
|
|
|
|
```bash
|
|
|
|
cargo install \
|
|
|
|
ag \
|
|
|
|
amber \
|
|
|
|
basic-http-server \
|
|
|
|
cargo-udeps \
|
|
|
|
kondo \
|
|
|
|
passerine \
|
|
|
|
passerine-aspen \
|
|
|
|
record-query \
|
|
|
|
rustfilt \
|
|
|
|
xcp
|
|
|
|
cargo +nightly install --git https://github.com/martinvonz/jj.git
|
|
|
|
cargo +nightly install --git https://github.com/getzola/zola.git
|
|
|
|
```
|
2022-05-10 15:34:34 -04:00
|
|
|
# Chezmoi
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sh -c "$(curl -fsLS chezmoi.io/get)"
|
|
|
|
mv ./bin/chezmoi "$HOME/.local/bin/"
|
|
|
|
```
|
2022-05-11 08:53:29 -04:00
|
|
|
|
|
|
|
# LunarVim
|
|
|
|
|
|
|
|
```bash
|
|
|
|
pacman -S yarn
|
|
|
|
bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh)
|
|
|
|
```
|