update
This commit is contained in:
parent
361d971966
commit
19da529c64
|
@ -129,17 +129,6 @@ it's the fastest zsh framework and out of the box setup nicely
|
|||
`chsh -s /bin/zsh`</br>
|
||||
`curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh`
|
||||
|
||||
I like to to add this to `.zshrc` for ctrl+f prepending sudo
|
||||
|
||||
```
|
||||
add_sudo (){
|
||||
BUFFER="sudo $BUFFER"
|
||||
zle -w end-of-line
|
||||
}
|
||||
zle -N add_sudo
|
||||
bindkey "^f" add_sudo
|
||||
```
|
||||
|
||||
### Setup docker
|
||||
|
||||
* have `docker` and `docker-compose` packages installed</br>
|
||||
|
@ -150,12 +139,25 @@ bindkey "^f" add_sudo
|
|||
`sudo gpasswd -a bastard docker`
|
||||
|
||||
|
||||
### extra stuff
|
||||
### Extra stuff
|
||||
|
||||
* `sudo pacman -S git cronie curl borg htop lm_sensors nnn`
|
||||
* `sudo pacman -S vim git cronie curl borg htop lm_sensors nnn bind-tools`
|
||||
* install yay for access to AUR packages</br>
|
||||
`git clone https://aur.archlinux.org/yay-bin.git`</br>
|
||||
`cd yay-bin && makepkg -si`</br>
|
||||
`cd .. && rm -rf yay-bin`</br>
|
||||
|
||||
`ctop` and `inxi` are good packages from yay
|
||||
|
||||
### Adding stuff to .zshrc
|
||||
|
||||
* `export EDITOR=vim`
|
||||
* for ctrl+f prepending sudo
|
||||
```bash
|
||||
add_sudo (){
|
||||
BUFFER="sudo $BUFFER"
|
||||
zle -w end-of-line
|
||||
}
|
||||
zle -N add_sudo
|
||||
bindkey "^f" add_sudo
|
||||
```
|
||||
|
|
|
@ -25,6 +25,14 @@ Password manager. RS version is simpler and lighter than the official bitwarden.
|
|||
└── bitwarden-backup-script.sh
|
||||
```
|
||||
|
||||
* `bitwarden-data/` - a directory where bitwarden will store its database and other data
|
||||
* `.env` - a file containing environmental variables for docker compose
|
||||
* `docker-compose.yml` - a docker compose file, telling docker how to build bitwarden container
|
||||
* `bitwarden-backup-script.sh` - a backup script if you want it
|
||||
|
||||
You only need to provide the files.</br>
|
||||
The directory is created by docker compose on the first run.
|
||||
|
||||
# docker-compose
|
||||
|
||||
[Documentation](https://github.com/dani-garcia/bitwarden_rs/wiki/Using-Docker-Compose) on compose.
|
||||
|
|
|
@ -106,7 +106,7 @@ the script must be **executabe** - `chmod +x borg_backup.sh`
|
|||
#### • Automatic execution
|
||||
|
||||
cron job, every day at 3:00</br>
|
||||
`crontab -e`
|
||||
`crontab -e`</br>
|
||||
`0 3 * * * /home/bastard/borg/borg_backup.sh`
|
||||
|
||||
# Remote backup
|
||||
|
|
|
@ -41,15 +41,16 @@ or machines on the network.
|
|||
└── docker-compose.yml
|
||||
```
|
||||
|
||||
* `config` - directory containing configs that Caddy generates,
|
||||
* `config/` - a directory containing configs that Caddy generates,
|
||||
most notably `autosave.json` which is a json version of the last run `Caddyfile`
|
||||
* `data` - directory storing TLS certificates
|
||||
* `.env` - file containing environmental variables for docker compose
|
||||
* `Caddyfile` - configuration file for Caddy
|
||||
* `docker-compose.yml` - docker compose file, telling docker how to build Caddy container
|
||||
* `data/` - a directory storing TLS certificates
|
||||
* `.env` - a file containing environmental variables for docker compose
|
||||
* `Caddyfile` - a configuration file for Caddy
|
||||
* `docker-compose.yml` - a docker compose file, telling docker how to build Caddy container
|
||||
|
||||
The directories are created by docker on the first run,
|
||||
the content is visible on only as root of docker host.
|
||||
You only need to provide the three files.</br>
|
||||
The directories are created by docker compose on the first run,
|
||||
the content of these is visible only as root of the docker host.
|
||||
|
||||
### - Create a new docker network
|
||||
|
||||
|
@ -232,6 +233,9 @@ For example trying to ping hosts that are suppose to be reachable,
|
|||
|
||||
There's also other possible issues, like bad port forwarding towards docker host.
|
||||
|
||||
*extra info:*</br>
|
||||
`docker exec -w /etc/caddy caddy caddy reload` reloads config.
|
||||
|
||||
# Caddy more info and various configurations
|
||||
|
||||
![caddyfile-diagram-pic](https://i.imgur.com/c0ycNal.png)
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
# dnsmasq
|
||||
|
||||
###### guide by example
|
||||
|
||||
![logo](https://i.imgur.com/SOa4kRd.png)
|
||||
|
||||
# Purpose
|
||||
|
||||
Lightweight DHCP and DNS server.
|
||||
|
||||
* [Official site](http://www.thekelleys.org.uk/dnsmasq/doc.html)
|
||||
* [Arch wik](https://wiki.archlinux.org/index.php/dnsmasq)
|
||||
|
||||
# Files and directory structure
|
||||
|
||||
```
|
||||
/etc/
|
||||
└── dnsmasq.conf
|
||||
```
|
||||
|
||||
# Installation
|
||||
|
||||
* Install dnsmasq from your linux official repos.
|
||||
* configuration
|
||||
* enable and start the service</br>
|
||||
`sudo systemctl enable --now dnsmasq`
|
||||
|
||||
# Configuration
|
||||
|
||||
|
||||
Configuration file location: /etc/dnsmasq.conf
|
||||
|
||||
`dnsmasq.conf`
|
||||
|
||||
```bash
|
||||
# dont use resolv.conf as it gets changed by DHCP
|
||||
resolv-file=/etc/resolv.conf.dnsmasq
|
||||
|
||||
# DHCP netmask
|
||||
# CLients get 255.255.255.0 as netmask
|
||||
dhcp-option=1,255.255.255.0
|
||||
|
||||
# default gateway
|
||||
# clients get 192.168.1.251 as gateway
|
||||
dhcp-option=3,192.168.1.69
|
||||
|
||||
# dns
|
||||
# clients get 192.168.1.69 as DNS (this is the IP of the Pi itself)
|
||||
dhcp-option=6,192.168.1.69
|
||||
|
||||
|
||||
#you can assign fixed ip adresses to hosts based on mac address
|
||||
dhcp-host=ma:ca:dr:e:ss:00,mycomp192.168.1.1,12h
|
||||
|
||||
|
||||
# all hosts not identified by mac get a dynamic ip out of this range:
|
||||
dhcp-range=192.168.1.120,192.168.1.200,12h
|
||||
```
|
||||
|
||||
# resolv.conf
|
||||
|
||||
Edit /etc/resolv.conf to send all requests to dnsmasq, then prevent c
|
||||
|
||||
* `nameserver 127.0.0.1`
|
||||
|
||||
Then make it immutable to prevent other services from making changes to it
|
||||
|
||||
* `chattr +i /etc/resolv.conf`
|
||||
|
||||
# /etc/hosts
|
||||
|
||||
dnsmasq reads all the DNS hosts and names from the /etc/hosts file,
|
||||
so add your DNS hosts IP addresses and name pairs as shown.
|
||||
|
||||
127.0.0.1 dnsmasq
|
||||
192.168.56.10 dnsmasq
|
||||
192.168.56.1 gateway
|
||||
192.168.56.100 maas-controller
|
||||
192.168.56.20 nagios
|
||||
192.168.56.25 webserver1
|
||||
|
||||
|
||||
# Update
|
||||
|
||||
* [watchtower](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/watchtower)
|
||||
updates the image automaticly
|
||||
|
||||
* manual image update</br>
|
||||
`docker-compose pull`</br>
|
||||
`docker-compose up -d`</br>
|
||||
`docker image prune`
|
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
|
@ -74,7 +74,7 @@ Homepage is configured in `config.yml` file.
|
|||
```yml
|
||||
title: "Homepage"
|
||||
subtitle: "Homer"
|
||||
logo: "assets/homer.png"
|
||||
logo: "assets/logo.png"
|
||||
# icon: "fas fa-skull-crossbones"
|
||||
footer: '<p>less boring look with a footer</p>'
|
||||
|
||||
|
|
Loading…
Reference in New Issue