-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvoid-linux-installation-notes.txt
More file actions
727 lines (636 loc) · 29 KB
/
void-linux-installation-notes.txt
File metadata and controls
727 lines (636 loc) · 29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
##################################
########### References ###########
##################################
https://voidlinux.org
http://www.troubleshooters.com/linux/void/index.htm
https://alkusin.net/voidlinux/
https://github.com/olivier-mauras/void-luks-lvm-installer/blob/master/install.sh
https://github.com/NAGA1337/void/blob/master/void.sh
https://github.com/alejandroliu/0ink.net/blob/master/snippets/void-installation/install.sh
https://github.com/addy-dclxvi/almighty-dotfiles
https://github.com/adi1090x/polybar-themes
https://github.com/adi1090x/rofi
https://github.com/ntcarlson/dotfiles
https://github.com/sdothum/dotfiles
https://github.com/denysdovhan/bash-handbook
https://gitlab.com/vahnrr/rofi-menus
http://thedarnedestthing.com/colophon
https://www.kernel.org/doc/Documentation/filesystems/f2fs.txt
https://www.kernel.org/doc/Documentation/filesystems/xfs.txt
https://www.kernel.org/doc/Documentation/filesystems/nilfs2.txt
https://www.kernel.org/doc/Documentation/filesystems/ext4.txt
http://ix.io/1wIS # aggressive nilfs config
https://www.shellcheck.net
https://wiki.archlinux.org/index.php/unbound
https://nlnetlabs.nl/documentation/unbound
https://www.funtoo.org/Keychain
http://pinyinjoe.com/index.html # Chinese language setup in Microsoft Windows, Ubuntu Linux
http://www.secfs.net/winfsp # mount remote folder on windows # root "\\sshfs.r\user@host/" # home '\\sshfs\user@host"
https://github.com/billziss-gh/winfsp
https://github.com/billziss-gh/sshfs-win
https://github.com/computefoundation/gnu-linux-shell-scripting/tree/master/scripts/x11_management-output_only#x11-management---output-only
https://github.com/paulihano/focus # window switcher
#############
### Email ###
#############
https://github.com/nicm/fdm # email suite
https://github.com/leahneukirchen/mblaze # email suite
http://gmvault.org # fetch gmail
https://pyropus.ca./software/getmail # mail retriever
https://www.fetchmail.info # mail retrieval and forwarding utility
https://github.com/foxcpp/maddy # mail server
https://mailinabox.email
https://imapsync.lamiral.info
https://github.com/imapsync/imapsync
########################
### Symlink Managers ###
########################
https://github.com/anishathalye/dotbot
https://github.com/lra/mackup
https://github.com/kairichard/lace
https://github.com/andsens/homeshick
https://gitlab.com/grm-grm/ck
https://gitlab.com/semente/summon
https://www.gnu.org/software/stow
https://www.chezmoi.io
#######################
### Terminal Themes ###
#######################
https://github.com/lemnos/theme.sh
https://github.com/ciembor/4bit
https://github.com/chriskempson/base16-shell
https://github.com/nvllsvm/base16-shell-preview
###################################
### Hide/Unhide Terminal Cursor ###
###################################
echo -en "\e[?25h" # unhide
tput civis # hide
tput cnorm # unhide
###################################
#
# Notes: Void Linux is running on Lenovo Thinkpad T420 in EFI only mode with "Dogfish 128GB" mSATA
# : Microsoft Windows switches to Nvidia Optimus mode if enabled
# : Nvidia Optimus prevents external monitor (display port) from working, Need to set bios to use "discrete"
# : Firefox is slow (10s) to start if /etc/hosts is incorrect (default hosts starts firefox ~5sec)
# : if audio stops working restart Firefox
# : Need to disable bitmap fonts "ln -s /usr/share/fontconfig/conf.avail/70-no-bitmaps.conf /etc/fonts/conf.avail/" or create ~/.config/fonts.conf so Firefox can use other fonts
# : Bluetooth(bluez) - Can be slow to detect device - pairs ok - connects and imediately disconnects - bluetooth audio not tested
# : For eSATA to work on T420 (tested with powered enclosure - without usb power) place the folowing in bash script (rescan-scsi-bus.sh didn't work)
# "for i in `ls /sys/class/scsi_host/`; do echo "- - -" > /sys/class/scsi_host/$i/scan; done"
# : 'doas' is used instead of 'sudo'(can install as dependency)
# : Using 'mv' via mergerfs mountpoint may fail to move all files (use rsync to clean up)
# : Grub will overwrite the mbr of an aleady installed operating system even if it's on a separate hard drive
# : Windows 10 will install efi and recovery data onto secondary hardrive
# : Updating Live CD kernel will result in "[*]" as an option to install
# : OSX 'finder' can truncate filenames on fat-32, trying to rename will error filename already exists. Need to rename via Terminal
# : void ncurses installer is problematic - it may work or fail trying to format
# : /home/$user/.asoundrc - increases volume
# : efibootmgr default label "Void Linux With Kernel 5.7"
# : ATAPI CD0 = HL-DT-STDVDRAM GT33N
# : efifb: mode is 640x480x32
# : alsa-utils >>> alsamixer is required to un-mute
# : intel-ucode - dracut default is to include which makes early_microcode=yes >> /etc/dracut.conf.d/intel_ucode.conf redundant
# : Not Required : kernel .efi extension
# : efivarfs /sys/firmware/efi/efivars efivarfs 0 0 >> /mnt/etc/fstab
# : Nilfs causes '/' to mount twice >> drops to emergency shell Need to 'exit' twice to continue booting and 'enter' to display login prompt
# : Bash script buffquote initially only showed the first quote in bash as RANDOM couldn't be found due to /bin/sh -> dash (works in dash) - need to run buffquote with /bin/bash
# : cron alteratives - fcron,hcron,dcron,bcron,scron,tinycron,cronie
# : thinkfan - set fan temp thresholds
# : mdocml=mandoc outputs man pages
# : autox - caused login to loop switching monitor off & on (herbstluftwm)
# : iwd - includes dhcp
# : unbound - will not start if interface is wrong
# : zathura - mupdf,poppler,djvu,epub (mupdf is faster then poppler)
# : apvlv - Alf's PDF Viewer Like Vim
# : xreader (Document Viewer)
# : aucatctl - changes volume in sndiod
# : bind-utils - dig (dns lookup), nslookup, host
# : lsyncd - service failed to start # erred with listed option as unknown
# : udevil - block mount only
# : zeroconf/bonjour >> mDNSResponder,python3-zeroconf,python-zeroconf,avahi
# : nemo - gvfs,gvfs-afp,gvfs-cdda,gvfs-smb,gvfs-afc,gvfs-mtp,gvfs-gphoto2
# - Network Mount >> /home/user/.cache/gvfs/sftp\:host\=XXXXXXXXXXX
# - Archive Extract >> file-roller
# - Video Thumbnails >> ffmpegthumbnailer
# - RAW & PDF thumbnails show after using thunar
# : gthumbs & rawtherapee display RAW
# : tumbler - "D-Bus Thumbnailer service" - unsure if unecassary
# : cherrytree - https://www.giuspen.com/cherrytree - note taking application
# : lsscsi - list drives
# : autorandr - create monitor profiles
# : audacity - fails to start via icon - starts via cli with errors then stops responding
# : reaper - starts then freezes - need to poweroff
# : testdisk - dependant on sudo (xbps-install fails if sudo not installed)
# : attr-progs - Extended attributes # getfattr,setfattr
# : imgcat - https://github.com/danielgatis/imgcat/releases/download/v1.0.8/imgcat_1.0.8_Linux_x86_64.tar.gz # Binary works
# - https://github.com/eddieantonio/imgcat # failed to compile
######################################################################################
############################## Preparatory Instructions ##############################
######################################################################################
### Download ###
wget https://ftp.swin.edu.au/voidlinux/live/current/sha256sum.sig
https://alpha.de.repo.voidlinux.org/live/current/sha256sum.sig
wget https://ftp.swin.edu.au/voidlinux/live/current/sha256sum.txt
https://alpha.de.repo.voidlinux.org/live/current/sha256sum.txt
wget https://ftp.swin.edu.au/voidlinux/live/current/void-live-x86_64-musl-20210218.iso
https://alpha.de.repo.voidlinux.org/live/current/void-live-x86_64-musl-20210218.iso
### Verify image ###
xbps-install void-release-keys signify
sha256sum -c --ignore-missing sha256sum.txt
void-live-x86_64-musl-20210218.iso: OK
signify -C -p /etc/signify/void-release-20210218.pub -x sha256sum.sig void-live-x86_64-musl-20210218.iso
Signature Verified
void-live-x86_64-musl-20210218.iso: OK
# Install void-live-x86_64-musl-20210218.iso to CD/usb
Note: Void Linux repository = ~1TB
: fdisk can format iso9660/HYBRID USB
: rufus - creates one partition -> /run/initramfs/live/data-is-here
: passmark imgUSB - formating free space is not reliable (blkid sometimes fails to detect partition)
# -------------------------------------------------- #
### base-voidstrap
# base-files ncurses coreutils findutils diffutils
# dash bash grep gzip file sed gawk less util-linux which tar man-pages
# mdocml>=1.13.3 shadow e2fsprogs btrfs-progs xfsprogs f2fs-tools dosfstools kbd
# procps-ng tzdata pciutils iana-etc eudev runit-void openssh dhcpcd
# iproute2 iputils iw xbps nvi sudo traceroute kmod
# -------------------------------------------------- #
### base-system
# base-files>=0.77 ncurses coreutils findutils diffutils libgcc
# dash bash grep gzip file sed gawk less util-linux which tar man-pages
# mdocml>=1.13.3 shadow e2fsprogs btrfs-progs xfsprogs f2fs-tools dosfstools
# procps-ng tzdata pciutils usbutils iana-etc openssh dhcpcd
# kbd iproute2 iputils iw wpa_supplicant xbps nvi sudo wifi-firmware
# void-artwork traceroute ethtool kmod acpid eudev runit-void
# -------------------------------------------------- #
### base-minimal
# base-files coreutils findutils diffutils dash grep gzip sed gawk
# util-linux which tar shadow procps-ng iana-etc xbps nvi tzdata
# runit-void
# -------------------------------------------------- #
##################################################################
####################### Siren Music Player #######################
##################################################################
https://www.kariliq.nl/siren
git clone https://www.kariliq.nl/git/siren.git
git clone https://github.com/tbvdm/siren.git
# Change location of config + metadata + library
sed -i 's+.siren+.config/siren+' siren.h
./configure \
aac=yes \
mad=no \
sndio=yes \
ffmpeg=yes \
mpg123=yes \
flac=yes \
opus=yes \
sndfile=yes \
vorbis=yes \
wavpack=yes \
sun=no \
oss=no \
ao=no \
portaudio=no \
pulse=no \
alsa=no
make && make install
# Audio formats
sndfile = wav,aiff
mad,mpg123 = mp3
ogg = ogg
wv = wavpack
opusfile = opus
faad = aac
mp4v2 = mp4
flac = flac
ffmpeg = flac,ogg,mp3,mp4,m4a
# Dependancies
libid3tag-devel wavpack-devel libmad-devel libmp4v2-devel flac-devel
libsndfile-devel libogg-devel mpg123-devel faad2-devel sndio-devel
pulseaudio-devel libpulseaudio-devel libao-devel portaudio-devel ffmpeg-devel
opusfile-devel pkg-config
# ~/.siren/config
set active-fg blue # foreground
#################################################################
####################### Vuurmuur Firewall #######################
#################################################################
https://www.vuurmuur.org
https://github.com/inliniac/vuurmuur/releases/download/0.8/vuurmuur-0.8.tar.gz
./configure && make && make install
xbps-install libmnl-devel dialog libnetfilter_conntrack-devel libnetfilter_log-devel
vuurmuur_conf --wizard # create config
vuurmuur_conf
>>> Rules >>> INS(ert) >>> [OUTGOING] Action [Accept] Log [x] Service [any] From [firewall] To [world.inet]
>>> [INCOMING] Action [Accept] Log [x] Service [any] From [lan] To [firewall]
>>> Iterfaces >>> inet-nic enp0s25 192.168.1.XX
>>> lan-nic enp0s25 192.168.1.XX
>>> Vuurmuur Config >>> Interfaces >>> uncheck dynamic interfaces for changes
###########################################################################################
########################## Bitwarden - Vaultwarden(Bitwarden_rs) ##########################
###########################################################################################
# https://bitwarden.com
# ---------- Extract Vaultwarden binary and Web-vault from docker image ------------------
https://github.com/jjlin/docker-image-extract
wget https://raw.githubusercontent.com/jjlin/docker-image-extract/main/docker-image-extract
chmod +x docker-image-extract
docker-image-extract vaultwarden/server:alpine
docker-image-extract bitwardenrs/server:testing-alpine
mkdir -p vaultwarden/data
mv output/vaultwarden /path/to/vaultwarden
mv output/web-vault /path/to/vaultwarden
rm -r output
wget https://raw.githubusercontent.com/dani-garcia/vaultwarden/main/.env.template --output-document=/path/to/vaultwarden/.env
fcrontab -e
# &bootrun,first(2) * * * * * cd /home/$USER/src/vaultwarden ./vaultwarden >> /var/log/vaultwarden.log 2>&1
# Install rustup
curl https://sh.rustup.rs -sSf | sh # installs to $HOME
select (1)
rustup self uninstall
# .bashrc
export RUSTUP_HOME=".local/share/rustup"
export CARGO_HOME=".local/share/cargo"
# Build Vaultwarden
https://github.com/dani-garcia/vaultwarden
git clone https://github.com/dani-garcia/bitwarden_rs && pushd bitwarden_rs
cargo clean && cargo build --features sqlite --release
mkdir ~/src/bitwarden_rs/target/release/data # needed for creation of rsa key
source .cargo/env # or .bash_profile
aria2c https://github.com/dani-garcia/bw_web_builds/releases/download/v2.15.1/bw_web_v2.15.1.tar.gz
tar xf bw_web_v2.15.1.tar.gz
mv web-vault bitwarden_rs/target/release
cp bitwarden_rs/.env.template bitwarden_rs/target/release/.env
# .env
DISABLE_ICON_DOWNLOAD=true # prevents Segmentaion Fault - appears to have been fixed
WEBSOCKET_ENABLED=true
WEBSOCKET_ADDRESS=0.0.0.0
WEBSOCKET_PORT=3012
# -------------------------------------------------- #
### Bitwarden CLI
xbps-install gcompat
https://github.com/bitwarden/cli/releases/download/v1.11.0/bw-linux-1.11.0.zip
chmod +x bw
mv bw /usr/local/bin
bw config server https://$HOSTNAME:2016
# Required for selfsigned certificate
NODE_TLS_REJECT_UNAUTHORIZED=0 bw login # disable certifcate check
NODE_EXTRA_CA_CERTS=<path to my ca> bw login
# -------------------------------------------------- #
### Caddy v2 Reverse Proxy
https://github.com/caddyserver/caddy
https://github.com/caddyserver/caddy/releases/download/v2.2.0-rc.1/caddy_2.2.0-rc.1_linux_amd64.tar.gz
tar xf caddy_2.2.0-rc.1_linux_amd64.tar.gz
mv caddy /usr/bin/
# Start Caddy with fcron or /etc/rc.local (displays caddy startup messages)
# create certificates
openssl req -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -keyout /path/to/cert.key -out /path/to/cert.crt
# ----------------------------
# Note: Do not install cargo/rust with xbps-install # Bitwarden_rs will not build
# rustup & cargo install size >1GB & ~3GB packages for vaultwarden
# 0.0.0.0:8000 # connection is not secure
# 127.0.0.1:8000 # this page is stored on your computer
# http://192.168.1.4:8000, https://$HOSTNAME:2016, https://$HOSTNAME # Lan access
#
# Caddy Log (Errors occured when using $HOSTNAME in Caddyfile - missing braces?)
# ---------------------------------------
# WARN pki.ca.local installing root certificate (you might be prompted for password) {“path”: “storage:pki/authorities/local/root.crt”}
# 2020/09/08 not NSS security databases found
# 2020/09/08 define JAVA_HOME environment variable to use the Java trust
# 2020/09/08 ERROR pki.ca.local failed to install root certificate {“error”: “install is not supported on this system”, “certificate_file”: “storage:pki/authorities/local/root.crt”}
# certificates did install to ~/.local/share/caddy/pki/authorities/local/caddy
# -----------------------
# 'caddy stop' errors if already stopped
# 2021/07/25 22:28:56.270 WARN failed using API to stop instance {"error": "performing request: Post \"http://localhost:2019/stop\": dial tcp [::1]:2019: connect: connection refused"}
# stop: performing request: Post "http://localhost:2019/stop": dial tcp [::1]:2019: connect: connection refused
# -------------------------------------------------- #
### SSHFS
xbps-install fuse-sshfs
sshfs user@server:/ /mnt/server
/etc/fstab
sshfs#$USER@$SERVER:/mnt/storage /home/user/server fuse reconnect,_netdev,idmap=user,delay_connect,defaults,allow_other 0 0
# -------------------------------------------------- #
### NFS Mount
/etc/exports
/path/here 'ip of OSX'(insecure,rw,sync,no_root_squash)
exportfs -a
mount -t nfs 192.168.1.4:/path /Users/$USER/mountpoint # OSX
Note: make sure permissions are correct or 'finder' will not not write
: unable to get nfs or autofs to work (void client > void server)
# -------------------------------------------------- #
### Alock (Pauses dunst notifications)
xbps-install automake imlib2-devel pam-devel libgcrypt-devel libXrender-devel
git clone https://github.com/Arkq/alock.git
cd alock
$ autoreconf --install
$ mkdir build && cd build
$ ../configure --enable-pam --enable-hash --enable-xrender --enable-imlib2 \
--with-dunst --with-xbacklight
$ make && make install
# -------------------------------------------------- #
### Dmenu-Extended
git clone https://github.com/MarkHedleyJones/dmenu-extended.git
python setup.py install
.config/dmenu-extended/config/dmenuExtended_preferences.txt
"menu": "rofi",
"menu_arguments": [
"-dmenu",
"-i"
],
Note: '-b' # moves window to bottom of screen
# -------------------------------------------------- #
### Java
xbps-install openjdk8-jre
https://www.java.com/en/download/linux_manual.jsp
# ~/.bashrc
JAVA_HOME=/home/user/src/jre1.8.0_261
export PATH=$JAVA_HOME/bin:$PATH
export LD_LIBRARY_PATH=/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server
# -------------------------------------------------- #
### DirSync Pro - requires LD_LIBRARY_PATH=/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server
https://www.dirsyncpro.org
https://downloads.sourceforge.net/project/directorysync/DirSync%20Pro%20%28stable%29/1.53/DirSyncPro-1.53-Linux.tar.gz
# -------------------------------------------------- #
### Clipboard Manaqers
https://sourceforge.net/projects/copyq
https://hluk.github.io/CopyQ
xbps-install CopyQ
### Keepboard (MacOs,Win,Linux) - Java
https://sourceforge.net/projects/keepboard
https://downloads.sourceforge.net/project/keepboard/Keepboard_Linux_5.5.zip
### Greenclip - required for rofi
https://github.com/erebe/greenclip
wget https://github.com/erebe/greenclip/releases/download/v4.2/greenclip
chmod +x greenclip
### Roficlip
https://github.com/gilbertw1/roficlip
### Clipster
git clone https://github.com/mrichar1/clipster
# -------------------------------------------------- #
### Osync
# https://github.com/deajan/osync
# Note: Usb may need to removed/reinserted for osync --on-changes to work
# -------------------------------------------------- #
### Fonts
fc-list # /usr/share/fonts
https://github.com/be5invis/Iosevka
https://overpassfont.org
https://mplus-fonts.osdn.jp
http://www.fial.com/~scott/tamsyn-font/download/tamsyn-font-1.11.tar.gz
# Firefox requires: "noto-fonts-cjk" (Not required for Chromium)
: ~/.config/fontconfig/fonts.conf
###################################################################
####################### Encrypt USERS $HOME #######################
###################################################################
xbps-install gocryptfs pam-mount
# Stop $USER processess & logout then login as root
mv /home/$USER /home/$USER.old
mkdir /home/$USER.cipher # encrypted
mkdir /home/$USER # empty mount
# correct $user,$user.cipher permissions # mount will fail if incorrect
gocryptfs -init $USER.CIPHER
mount $user.cipher onto $user
gocryptfs $USER.CIPHER $USER
cp -r $USER.OLD $USER
# The following (3) files allow $HOME to auto mount
# -------------------------------------------------- #
# /etc/security/pam_mount.conf.xml
< volume user="$USER" fstype="fuse" options="nodev,nosuid,quiet,nonempty,allow_other"
path="/usr/local/bin/gocryptfs#/home/%(USER).cipher" mountpoint="/home/%(USER)" />
# -------------------------------------------------- #
# /etc/pam.d/system-login
#%PAM-1.0
auth required pam_tally.so onerr=succeed file=/var/log/faillog
auth required pam_shells.so
auth requisite pam_nologin.so
auth optional pam_mount.so <<<< add this <<<<
auth include system-auth
account required pam_access.so
account required pam_nologin.so
account include system-auth
password optional pam_mount.so <<<< add this <<<<
password include system-auth
session optional pam_loginuid.so
session optional pam_mount.so <<<< add this <<<<<
session include system-auth
session optional pam_motd.so motd=/etc/motd
session optional pam_mail.so dir=/var/mail standard quiet
-session optional pam_elogind.so
-session optional pam_ck_connector.so nox11
session required pam_env.so
session required pam_lastlog.so silent
# -------------------------------------------------- #
# /etc/fuse.conf
# user_allow_other # uncomment
# -------------------------------------------------- #
### Mopidy Music Server
xbps-install mopidy snapserver snapclient snapcast python3-pip
ln -s /etc/sv/mopidy /etc/runit/runsvdir/default
ln -s /etc/sv/snapserver /etc/runit/runsvdir/default
python3 -m pip install Mopidy-Iris
# /etc/mopidy.conf
[audio]
mixer = software
mixer_volume = 100
output = audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! wavenc ! filesink location=/tmp/snapfifo
Note: mopidy needs output server mpd,snapcast
: scan notification appears to never end
# -------------------------------------------------- #
### Nohang - prevent out of memory
git clone https://github.com/hakavlad/nohang.git
nohang --monitor -c /usr/local/etc/nohang/nohang-desktop.conf
/usr/local/etc/nohang/nohang.conf
# -------------------------------------------------- #
### Spacemacs
xbps-install emacs-x11
git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
# -------------------------------------------------- #
# =====================================
# [!] IMPORTANT - POST INSTALLATION [!]
# =====================================
### Dnscrypt-Proxy
# /etc/dnscrypt-proxy.toml
server_names = ['scaleway-fr', 'google', 'yandex', 'cloudflare']
listen_addresses = ['127.0.0.1:5335']
### Enable a DNS cache to reduce latency and outgoing traffic
cache = false
# -------------------------------------------------- #
### Unbound
unbound-checkconf
unbound-anchor # /etc/dns/root.key
unbound-control-setup # certificates
# -------------------------------------------------- #
### Borg Backup
Note: see /etc/fstab for borg mounts
borg init --encryption=none /mnt/borg-backup::borg
# -------------------------------------------------- #
fcrontab -e
# Borg Backup - Hourly
# 0 * * * * /home/$USER/scripts/borg-backup.sh >> /var/log/borg-backup.log 2>&1
# Unbound - Monthly
# @ 1m cd /etc/unbound/unbound-updater && ./unbound-update-blocklist.sh 2>&1
# Bitwarden_rs - 2m after boot
# &bootrun,first(2) * * * * * cd /home/$USER/src/bitwarden_rs/target/release ./bitwarden_rs >> /var/log/bitwarden_rs.log 2>&1
# Vuurmuur - start as daemon
# &bootrun,first(1) * * * * * vuurmuur -D && vuurmuur_log 2>&1
# Osync 2m after boot
# &bootrun,first(2) * * * * * /usr/local/bin/osync.sh /etc/osyncsync.conf --on-changes --silent
Note: fcron 3.3.0 @reboot unknown option
fcron 3.2.1 @reboot works # SalixOs(Slackware)
# /etc/fcron/fcron.conf
editor = /usr/bin/mle
# -------------------------------------------------- #
### Network - WIFI
xbps-install iwd openresolv iproute2
sv start iwd
iw dev wlan0 scan | grep SSID
iwctl --passphrase="password-goes-here" station wlan0 connect "$routerssid"
# /var/lib/iwd/routerssid/password
# /etc/iwd/main.conf
# [General]
# EnableNetworkConfiguration=true
# UseDefaultInterface=true
#
# [Network]
# NameResolvingService=resolvconf
# -------------------------------------------------- #
### Openresolv
# /etc/resolvconf.conf
name_servers=127.0.0.1 # default
resolv_conf_options=edns0
resolvconf -u # updates /etc/resolv.conf
# -------------------------------------------------- #
### Mpv
mpv --audio-device=sndio video.mkv
.config/mpv/mpv.conf
audio-device=sndio
Notes: mpv will run slowly if mpv.conf is missing
: mpv,smplayer will have video/audio desynchronization errors if Audio output driver is not set to sndio
: sndio no longer supported
# -------------------------------------------------- #
### OpenAL
cp /usr/share/examples/libopenal/alsoftrc.sample ~/.alsoftrc
[ general ]
drivers = sndio
# -------------------------------------------------- #
### Printer
Notes:
test page doesn't print correctly - zathura prints pdf ok
system-config-printer # gui glitchy fails to render # only tested with herbstluftwm
xbps-install cups cups-filters gutenprint
ln -s /etc/sv/cupsd /etc/runit/runsvdir/default
ln -s /etc/sv/cups-browsed /etc/runit/runsvdir/default
# Cups Administration 127.0.0.1:631 # login as root
>>> Advanced >> Advertise web interface
>> Allow remote admin
# -------------------------------------------------- #
### Scanner
xbps-install simple-scan skanlite sane
sane-find-scanner
scanimage -L
Notes: imagescan(EPSON Image Scan v3) fails to detect scanner(epson v700)
12800dpi >> Empty filename passed to function, sane_start= Invalid argument
simple-scan >> 2400dpi
skanlite >> 9600dpi
# -------------------------------------------------- #
### Blank screen 1m turn off 2m
setterm --blank 1 --powerdown 2
# -------------------------------------------------- #
#########################################
################# Email #################
#########################################
xbps-install isync notmuch afew astroid aerc
### Mbsync
Notes: isync(mbsync) is faster then offlineimap
# .mbsyncrc
IMAPAccount email
Host mail.server
User
Pass *********
PassCmd "bw get password 'xxx xxx'" # bitwarden cli
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
IMAPStore email-remote
Account email
MaildirStore email-local
Path ~/.mail/email/
Inbox ~/.mail/email/Inbox
Subfolders Verbatim
Channel email
Master :email-remote:
Slave :email-local:
Patterns *
Create Both
Sync Pull
SyncState *
# -------------------------------------------------- #
### Aerc
# .config/aerc/accounts.conf
[title]
source = imaps://email%40address:[email protected]
outgoing = smtps+plain://email%40address:[email protected]
default = Inbox
from = name <email@address>
copy-to =
# -------------------------------------------------- #
### Lieer - Gmail
git clone https://github.com/gauteh/lieer.git
xbps-install libnotmuch-devel python3-pip python3-google-api-python-client notmuch python3-tqdm python3-yarl python3-oauth2client
cd lieer && pip install .
# -----------------------------
### Ripmime - Extract Email Attachments - Requires glibc to build - binary will run on musl
https://pldaniels.com/ripmime/
git clone https://github.com/inflex/ripMIME.git
make
make install
ripmime -i file . # extract to current directory
ripmime -i file -d /tmp
# -------------------------------------------------- #
### Femtomail
xbps-install make gcc git
git clone https://git.lekensteyn.nl/femtomail.git
cd femtomail
make USERNAME=root MAILBOX_PATH=/var/mail
make install install-link-sendmail setcap
mkdir -p /var/mail/new/
#### [!] Warning [!] ####
make uninstall - will delete symbolic link /usr/sbin and not femtomail
#### email-test.sh
# #!/bin/bash
# (echo Subject: testING; echo) | sendmail $USER
# -------------------------------------------------- #
### Nvidia
https://nouveau.freedesktop.org/wiki/VideoAcceleration/
$ mkdir /tmp/nouveau
$ cd /tmp/nouveau
$ wget https://raw.github.com/envytools/firmware/master/extract_firmware.py
$ wget http://us.download.nvidia.com/XFree86/Linux-x86/325.15/NVIDIA-Linux-x86-325.15.run
$ sh NVIDIA-Linux-x86-325.15.run --extract-only
$ python2 extract_firmware.py # this script is for python 2 only
mkdir /lib/firmware/nouveau
cp -d nv* vuc-* /lib/firmware/nouveau/
# List gpu driver in use
lshw -class video | grep driver=
# configuration: driver=nouveau latency=0
Note: NVIDIA-Linux-x86-390.138 Latest
Nvidia driver not compatible with Musl
vuc-* files don't exist
chromium browser errors without /lib/firmware/nouveau
# -------------------------------------------------- #
### Chromium
# Error: /etc/machine-id contains 0 characters (32 were expected).
doas ln -s /var/lib/dbus/machine-id /etc/
### VLC
https://github.com/stefantalpalaru/w_scan2 # fork
w_scan -c AU -L >> channels.xspf
Note: prevent/mitigate TS discontinuity errors
- disable "Trust in-stream PCR"
- enable "Seek based on percent not time"
installing xset prevents screensaver error
# -------------------------------------------------- #
### Gparted
xbps-install gparted polkit-gnome
Note: polkit-gnome allows gparted to be started by $USER via icon
xhost allows ROOT to open display
xhost +si:localuser:root # add user
xhost -si:localuser:root # remove user
# OR
doas env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY gparted
# -------------------------------------------------- #