mirror of
https://github.com/AlexBocken/mykb.git
synced 2024-11-26 00:09:46 +01:00
Compare commits
No commits in common. "a4e9e4ae1bb97bd14771347ac54dc9c9e0cb3905" and "e17201e8e90df1ca89f3b9e79d03422560aa840d" have entirely different histories.
a4e9e4ae1b
...
e17201e8e9
@ -1,25 +0,0 @@
|
|||||||
# LaptopSetup
|
|
||||||
|
|
||||||
General Tips and tricks for setting up Laptops in particular. Assuming Arch Linux/systemd.
|
|
||||||
|
|
||||||
## Power/Hibernation
|
|
||||||
|
|
||||||
We want to not edit pacman-provided files but provide drop-ins.
|
|
||||||
Hence create the folder `/etc/systemd/logind.conf.d` if not already present.
|
|
||||||
|
|
||||||
All the following settings will be written into `/etc/systemd/logind.conf.d/logind.conf`
|
|
||||||
|
|
||||||
### Let DWM handle PowerOff
|
|
||||||
|
|
||||||
```conf
|
|
||||||
[Login]
|
|
||||||
HandlePowerKey=ignore
|
|
||||||
```
|
|
||||||
|
|
||||||
### Hibernate on Lid close
|
|
||||||
|
|
||||||
```conf
|
|
||||||
[Login]
|
|
||||||
HandleLidSwitch=hibernate
|
|
||||||
HandleLidSwitchExternalPower=hibernate
|
|
||||||
```
|
|
@ -15,8 +15,8 @@ Note: for BIOS systems a dummy 1M parition would be also required. For UEFI this
|
|||||||
|
|
||||||
## Create LVM
|
## Create LVM
|
||||||
```sh
|
```sh
|
||||||
cryptsetup luksFormat /dev/sda2
|
cryptsetup luksFormat /dev/sda3
|
||||||
cryptsetup open /dev/sda2 cryptlvm
|
cryptsetup open /dev/sda3 cryptlvm
|
||||||
pvcreate /dev/mapper/cryptlvm
|
pvcreate /dev/mapper/cryptlvm
|
||||||
vgcreate vg /dev/mapper/crypylvm
|
vgcreate vg /dev/mapper/crypylvm
|
||||||
```
|
```
|
||||||
@ -102,7 +102,7 @@ and add to `GRUB_CMDLINE_LINUX`: (can have multiple, space-separated arguments s
|
|||||||
```/etc/default/grub
|
```/etc/default/grub
|
||||||
GRUB_CMDLINE_LINUX="cryptdevice=UUID=device-UUID:cryptlvm"
|
GRUB_CMDLINE_LINUX="cryptdevice=UUID=device-UUID:cryptlvm"
|
||||||
```
|
```
|
||||||
and replace "device-UUID" with the uuid we got for `/dev/sda2` from the previous `ls` command. Of course remove all the trailing `ls` output.
|
and replace "device-UUID" with the uuid we got for `/dev/sda3` from the previous `ls` command. Of course remove all the trailing `ls` output.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB --recheck
|
grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB --recheck
|
||||||
@ -120,7 +120,7 @@ set prefix=($root)/boot/grub
|
|||||||
insmod normal
|
insmod normal
|
||||||
normal
|
normal
|
||||||
```
|
```
|
||||||
and replace device-UUID with the same device-UUID as before, (again, a `ls -l /dev/disk/by-uuid >> /boot/grub/grub-pre.cfg` can help here to get the UUID for `/dev/sda2`)
|
and replace device-UUID with the same device-UUID as before, (again, a `ls -l /dev/disk/by-uuid >> /boot/grub/grub-pre.cfg` can help here to get the UUID for `/dev/sda3`)
|
||||||
|
|
||||||
Now we can overwrite our previously generated grubx64.efi with a luks2 compatible one:
|
Now we can overwrite our previously generated grubx64.efi with a luks2 compatible one:
|
||||||
```sh
|
```sh
|
||||||
@ -135,7 +135,7 @@ Create a keyfile:
|
|||||||
```sh
|
```sh
|
||||||
dd bs=512 count=4 if=/dev/random of=/crypto_keyfile.bin iflag=fullblock
|
dd bs=512 count=4 if=/dev/random of=/crypto_keyfile.bin iflag=fullblock
|
||||||
chmod 600 /crypto_keyfile.bin
|
chmod 600 /crypto_keyfile.bin
|
||||||
cryptsetup luksAddKey /dev/sda2 /crypto_keyfile.bin
|
cryptsetup luksAddKey /dev/sda3 /crypto_keyfile.bin
|
||||||
```
|
```
|
||||||
Add this to the initramfs:
|
Add this to the initramfs:
|
||||||
```/etc/mkinitcpio.conf
|
```/etc/mkinitcpio.conf
|
||||||
@ -167,8 +167,8 @@ cryptsetup luksFormat /dev/sdX
|
|||||||
cryptsetup open /dev/sdX YourDiskNameHere
|
cryptsetup open /dev/sdX YourDiskNameHere
|
||||||
mkfs.ext4 /dev/mapper/YourDiskNameHere
|
mkfs.ext4 /dev/mapper/YourDiskNameHere
|
||||||
```
|
```
|
||||||
If you do not wish to have to enter the additional password on boot-up you will have to create a keyfile like we did for our /dev/sda2 above.
|
If you do not wish to have to enter the additional password on boot-up you will have to create a keyfile like we did for our /dev/sda3 above.
|
||||||
Of course this will lessen security as any additional hard-drives can also be decrypted if `/dev/sda2` has been decrypted or cracked.
|
Of course this will lessen security as any additional hard-drives can also be decrypted if `/dev/sda3` has been decrypted or cracked.
|
||||||
|
|
||||||
Systemd can autodetec keys in `/etc/cryptsetup-keys.d` if they have the pattern `YourDiskNameHere.key`. Create this directory if not already present:
|
Systemd can autodetec keys in `/etc/cryptsetup-keys.d` if they have the pattern `YourDiskNameHere.key`. Create this directory if not already present:
|
||||||
```sh
|
```sh
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# Neomutt
|
# Neomutt
|
||||||
|
|
||||||
|
|
||||||
## Markdown to HTML rendering
|
## Markdown to HTML rendering
|
||||||
To write more normie-friendly emails, non-plain-text emails are probably better.
|
To write more normie-friendly emails, non-plain-text emails are probably better.
|
||||||
For this, a conversion from Markdown to HTML with Mathjax support seems best.
|
For this, a conversion from Markdown to HTML with Mathjax support seems best.
|
||||||
@ -13,7 +12,7 @@ Ensure `pandoc` is installed. (`which pandoc || sudo pacman -S pandoc`)
|
|||||||
|
|
||||||
Add to your muttrc (either in `~/.mutt/muttrc` or `~/.config/mutt/muttrc`. From now on assuming `~/.config/mutt` as config folder)
|
Add to your muttrc (either in `~/.mutt/muttrc` or `~/.config/mutt/muttrc`. From now on assuming `~/.config/mutt` as config folder)
|
||||||
|
|
||||||
```muttrc
|
```
|
||||||
macro compose m \
|
macro compose m \
|
||||||
"<enter-command>set pipe_decode<enter>\
|
"<enter-command>set pipe_decode<enter>\
|
||||||
<pipe-message>pandoc -f gfm -t plain -o /tmp/msg.txt<enter>\
|
<pipe-message>pandoc -f gfm -t plain -o /tmp/msg.txt<enter>\
|
||||||
@ -78,7 +77,7 @@ Create a second macro for which you use a different template, that excludes the
|
|||||||
This way you can create smaller emails with pure markdown syntax and when necessary can send mathematical formulas, resulting in larger mails.
|
This way you can create smaller emails with pure markdown syntax and when necessary can send mathematical formulas, resulting in larger mails.
|
||||||
|
|
||||||
For this add the following to the muttrc:
|
For this add the following to the muttrc:
|
||||||
```muttrc
|
```
|
||||||
macro compose l \
|
macro compose l \
|
||||||
"<enter-command>set pipe_decode<enter>\
|
"<enter-command>set pipe_decode<enter>\
|
||||||
<pipe-message>pandoc -f gfm -t plain -o /tmp/msg.txt<enter>\
|
<pipe-message>pandoc -f gfm -t plain -o /tmp/msg.txt<enter>\
|
||||||
@ -118,19 +117,8 @@ $endfor$
|
|||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
```
|
```
|
||||||
## Khard Adress Book integration
|
|
||||||
Sadly, khard does not have a great TUI as abook, but it benefits from being able to sync with CardDav servers like Nextcloud.
|
|
||||||
|
|
||||||
For seamless integration such as adding emails and autocompleting from the address book, add the following to your muttrc (either in `~/.mutt/muttrc` or `~/.config/mutt/muttrc`. From now on assuming `~/.config/mutt` as config folder)
|
### Usage with abook
|
||||||
```muttrc
|
|
||||||
set query_command = "echo %s | xargs khard email --parsable --"
|
|
||||||
macro index,pager a \
|
|
||||||
"<pipe-message>khard add-email<return>" \
|
|
||||||
"add the sender email address to khard"
|
|
||||||
```
|
|
||||||
For syncing with CardDav servers like Nextcloud look into [NextCloud](./nextcloud.md).
|
|
||||||
|
|
||||||
## abook Adress Book integration
|
|
||||||
|
|
||||||
Add the following to the muttrc. The first line set the default query to use abook, while the second line allows us to quickly add the sender of a mail that we currently read to the adress book using `A`.
|
Add the following to the muttrc. The first line set the default query to use abook, while the second line allows us to quickly add the sender of a mail that we currently read to the adress book using `A`.
|
||||||
|
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
#Nextcloud
|
|
||||||
## Installation
|
|
||||||
We're assuming an Arch Linux installation, but the steps should be similar for other distributions.
|
|
||||||
There are two possible ways to serve Nextclouds PHP code: uWSGI and PHP-FPM.
|
|
||||||
We'll be using PHP-FPM as this is the recommended way and nginx is easier to setup with it, especially if you wish to enable additional plugins such as LDAP.
|
|
||||||
|
|
||||||
TODO
|
|
||||||
|
|
||||||
## Setup a drop-off folder in Nextcloud
|
|
||||||
|
|
||||||
1. Create a folder in Nextcloud, e.g. `Drop-off`.
|
|
||||||
2. Click on the share icon and under share link select "File-drop". This will create a link that you can share with others.
|
|
||||||
3. Optional: If you want to password protect the link, click on "Advanced settings" under the Sharing tab for the folder detailsand use a password of your choice.
|
|
||||||
|
|
||||||
### Human-readable link with redirect
|
|
||||||
If you want a nice human-readable link you can use your own nginx for this.
|
|
||||||
Add to your existant server block with port 443 in `/etc/nginx/sites-available/nextcloud` or your domain of choice with the following content:
|
|
||||||
|
|
||||||
```nginx
|
|
||||||
location /dropoff {
|
|
||||||
return 301 <your nextcloud share link>;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Sync contacts with khard
|
|
||||||
TODO
|
|
||||||
|
|
||||||
See [neomutt.md](./neomutt.md) for more details on how to use khard with neomutt for autocompletion.
|
|
||||||
|
|
||||||
## Sync Calendar with Calcurse
|
|
||||||
TODO
|
|
2
index.md
2
index.md
@ -3,7 +3,6 @@ Install instructions, configuration methods and much more for the setup of an us
|
|||||||
Happy to accept pull requests for new topics!
|
Happy to accept pull requests for new topics!
|
||||||
|
|
||||||
# Desktop Programs
|
# Desktop Programs
|
||||||
- [Laptop Setup](docs/LaptopSetup.md) General tips and tricks around the quirks of Arch on a Laptop.
|
|
||||||
- [qutebrowser](docs/qutebrowser.md)
|
- [qutebrowser](docs/qutebrowser.md)
|
||||||
highly customizable keyboard focused webbrowser using vim bindings
|
highly customizable keyboard focused webbrowser using vim bindings
|
||||||
- [vimwiki](docs/vimwiki.md)
|
- [vimwiki](docs/vimwiki.md)
|
||||||
@ -28,7 +27,6 @@ Happy to accept pull requests for new topics!
|
|||||||
- [anki sync server](docs/anki_sync_server.md) personal sync server for anki, a spaced repetition learning program
|
- [anki sync server](docs/anki_sync_server.md) personal sync server for anki, a spaced repetition learning program
|
||||||
- [docker](docs/docker.md) General tips and tricks around the container manager
|
- [docker](docs/docker.md) General tips and tricks around the container manager
|
||||||
- [Searx](docs/Searx.md) A meta searchengine which respects privacy. Arch setup guide.
|
- [Searx](docs/Searx.md) A meta searchengine which respects privacy. Arch setup guide.
|
||||||
- [Nextcloud](docs/Nextcloud.md) A self-hosted cloud solution. Installation (on Arch), configuration, and usage tips.
|
|
||||||
|
|
||||||
=======
|
=======
|
||||||
- [calcurse sync](docs/calDAV.md) Sync calcurse with you phone etc.
|
- [calcurse sync](docs/calDAV.md) Sync calcurse with you phone etc.
|
||||||
|
Loading…
Reference in New Issue
Block a user