196 lines
4.8 KiB
Markdown
196 lines
4.8 KiB
Markdown
# dotfiles
|
|
|
|
## Bulk commands
|
|
```
|
|
yay -S spectrwm fish openssh rofi xorg xorg-server scrot xorg-xinit alacritty ranger feh nerd-fonts-complete xf86-video-intel firefox cifs-utils pulseaudio-alsa pulseaudio-ctl slock xautolock zip unzip alsa-utils redshift-minimal numlockx usbutils cmatrix yubikey-touch-detector
|
|
cp dotfiles/.xinitrc ~/.xinitrc
|
|
cp dotfiles/.fehbg ~/.fehbg
|
|
chmod +x ~/.fehbg
|
|
cp dotfiles/.bash_profile ~/.bash_profile
|
|
mkdir -p ~/.config/{spectrwm,alacritty,rofi,fish/{functions}}
|
|
cp dotfiles/.config/spectrwm/spectrwm.conf ~/.config/spectrwm/spectrwm.conf
|
|
cp dotfiles/.config/spectrwm/spectrwm_fr.conf ~/.config/spectrwm/spectrwm_fr.conf
|
|
cp dotfiles/.config/spectrwm/bar ~/.config/spectrwm/bar
|
|
cp dotfiles/.config/alacritty/alcaritty.yml ~/.config/alacritty/alacritty.yml
|
|
cp dotfiles/.config/rogi/config ~/.config/rofi/config
|
|
cp dotfiles/.config/fish/config.fish ~/config/fish/config.fish
|
|
cp dotfiles/.config/fish/functions/cl.fish ~/.config/fish/functions/cl.fish
|
|
cp dotfiles/.config/fish/functions/fish_prompt.fish ~/.config/fish/functions/fish_prompt.fish
|
|
sudo sed -i "s/autospawn = no/autospawn = yes/" /etc/pulse/client.conf
|
|
```
|
|
|
|
## Packages
|
|
|
|
### General purposes
|
|
```
|
|
yay -S spectrwm fish openssh rofi xorg xorg-server scrot xorg-xinit alacritty ranger feh nerd-fonts-complete xf86-video-intel firefox cifs-utils pulseaudio-alsa pulseaudio-ctl slock xautolock zip unzip alsa-utils redshift-minimal numlockx usbutils cmatrix yubikey-touch-detector
|
|
```
|
|
|
|
### Pentest purposes
|
|
```
|
|
yay -S wfuzz exploitdb nmap gobuster nikto hydra perl-image-exiftool zsteg rtl88xxau-aircrack-dkms-git rockyou seclists-git fcrackzip gdb radare2 enum4linux peass hashcat intel-compute-runtime metasploit
|
|
```
|
|
|
|
## Configurations
|
|
|
|
### Locale
|
|
```
|
|
sudo localectl set-keymap fr
|
|
sudo localectl --no-convert set-x11-keymap fr pc104
|
|
sudo localectl set-locale LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8
|
|
sudo timedatectl set-timezone Europe/Paris
|
|
sudo timedatectl set-ntp true
|
|
```
|
|
|
|
### Permissions
|
|
```
|
|
chown $USER:users .bash_profile
|
|
chown -R $USER:users .config/
|
|
chown $USER:users .fehbg
|
|
sudo chown root:root pulse/
|
|
sudo chown root:root system/
|
|
chown $USER:users .tmux.conf
|
|
sudo chown root:root X11/
|
|
chown $USER:users .xinitrc
|
|
sudo chown root:root xorg.conf.d/
|
|
```
|
|
|
|
### Freebox share
|
|
```
|
|
sudo mkdir -p /mnt/data
|
|
sudo mkdir /etc/samba/credentials
|
|
sudo chown root:root /etc/samba/credentials
|
|
echo "username=<username>
|
|
password=<password> | sudo tee -a /etc/samba/credentials/data
|
|
sudo chmod 700 /etc/samba/credentials/
|
|
sudo chmod 600 /etc/samba/credentials/data
|
|
```
|
|
|
|
### Enable services
|
|
```
|
|
sudo systemctl enable slock@ap.service
|
|
sudo systemctl enable --now mnt-data.automount
|
|
```
|
|
|
|
## Misc
|
|
|
|
### Generate a WPA-PSK for `netctl` Wi-Fi config files
|
|
Copy the value of the `psk` key and paste it in the `netctl` config file and prefix it with `Key=\"`.
|
|
|
|
```
|
|
wpa_passphrase <ssid> <password>
|
|
```
|
|
|
|
## Specific installations
|
|
|
|
### Docker
|
|
In some cases, closing (and then reopening) your session is necessary.
|
|
|
|
```
|
|
yay -S docker
|
|
sudo gpasswd --add $USER docker
|
|
sudo systemctl start docker
|
|
sudo systemctl enable docker (optional)
|
|
```
|
|
|
|
#### Simple test
|
|
```
|
|
docker run --name nginx -p 80:80 -d nginx
|
|
```
|
|
|
|
#### Clean Docker (images, volumes and more that are not used)
|
|
```
|
|
docker system prune --all --volumes
|
|
```
|
|
|
|
### Tinygo
|
|
```
|
|
yay -S tinygo avrdude avr-gcc avr-libc
|
|
```
|
|
|
|
#### Commands
|
|
|
|
##### Upload led blinking to Arduino Nano
|
|
```
|
|
tinygo flash -target=arduino-nano -port=/dev/ttyUSB0 examples/blinky1
|
|
```
|
|
|
|
##### Upload source code to Arduino Nano
|
|
```
|
|
tinygo flash -target arduino-nano /path/to/code
|
|
```
|
|
|
|
### Arduino IDE and Arduino CLI
|
|
```
|
|
yay -S arduino arduino-cli
|
|
sudo usermod -aG uucp $USER or sudo usermod -aG tty $USER
|
|
sudo chmod a+rw /dev/ttyUSBX
|
|
```
|
|
|
|
### Jekyll
|
|
```
|
|
yay -S ruby
|
|
gem update
|
|
gem install bundler jekyll
|
|
```
|
|
|
|
#### Add gem's path to fish's path
|
|
```
|
|
set -U fish_user_paths ~/.gem/ruby/2.7.0/bin $fish_user_paths
|
|
```
|
|
|
|
### Rust
|
|
Replace `{default, stable, nighlty}` by the toolchain you want install.
|
|
|
|
```
|
|
yay -S rustup
|
|
rustup {default, stable, nightly}
|
|
```
|
|
|
|
#### Update toolchain
|
|
```
|
|
rustup update
|
|
```
|
|
|
|
### IntelliJ IDEA
|
|
```
|
|
yay -S intellij-idea-ultimate-edition-jre
|
|
```
|
|
|
|
#### Use fish shell inside IntelliJ IDEA
|
|
```
|
|
sudo ln -s ~/.config/fish/fish_variables /opt/intellij-idea-ultimate-edition/plugins/terminal/fish/fish_variables
|
|
```
|
|
|
|
### Laravel
|
|
|
|
#### Install Composer
|
|
```
|
|
yay -S composer
|
|
```
|
|
|
|
#### Install Laravel Installer
|
|
```
|
|
composer global require laravel/installer
|
|
```
|
|
|
|
#### Add Laravel Installer's path to fish's path
|
|
```
|
|
set -U fish_user_paths ~/.config/composer/vendor/laravel/installer/bin $fish_user_paths
|
|
```
|
|
|
|
### Fish
|
|
|
|
#### Remove a path into fish's path
|
|
|
|
##### List current path(s)
|
|
```
|
|
echo $fish_user_paths | tr " " "\n" | nl
|
|
1 ~/.config/composer/vendor/laravel/installer/bin
|
|
```
|
|
|
|
##### Delete the useless one (replace 1 by the desired index)
|
|
```
|
|
set --erase --universal fish_user_paths[1]
|
|
```
|