dot

packages and services management
Log | Files | Refs | README

commit 6c8531f981716b78ce52864d28e0a9fe9ed75021
parent 427080f95932e043959aa2414c2ebaa9265fd8f5
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri, 20 Jul 2018 01:18:17 +0200

s6: add tls support to msmtp

Diffstat:
Mbin/play | 13+++++--------
Mbin/xdg-open | 2+-
Mconfigure | 30++++--------------------------
Adot/bash_profile | 2++
Adot/bashrc | 2++
Rdot/git -> dot/config/git/config | 0
Adot/enchive/enchive.pub | 2++
Adot/enchive/enchive.sec | 2++
Adot/gnupg/pubring.gpg | 2++
Adot/gnupg/secring.gpg | 2++
Ddot/mblaze | 3---
Adot/mblaze/profile | 3+++
Mdot/msmtprc | 10+++++-----
Ddot/ssh | 45---------------------------------------------
Rdot/authorized_keys -> dot/ssh/authorized_keys | 0
Adot/ssh/config | 42++++++++++++++++++++++++++++++++++++++++++
Dmirror | 18------------------
Ms6/qmail-smtpd/run | 11+++++++++++
As6/qmail-smtpd/tls | 8++++++++
Ms6/qmail/data/control/defaultdelivery | 2+-
Rs6/tls/log/run -> s6/tls-server/log/run | 0
Rs6/tls/run -> s6/tls-server/run | 0
Muser/collectd/add | 2+-
Muser/dns/add | 2+-
Muser/git/add | 2+-
Auser/josuah/add | 3+++
Muser/qmail/add | 2+-
Muser/tor/add | 2+-
Muser/u9fs/add | 2+-
Muser/venti/add | 2+-
30 files changed, 102 insertions(+), 114 deletions(-)

diff --git a/bin/play b/bin/play @@ -1,10 +1,7 @@ -#!/9/bin/rc +#!/usr/bin/env execlineb # play every music/video file in a dir -for (a in $*) { - if (test -d $a) - for (song in `{find $a -type f | sort}) - play $song - if not - ffplay -autoexit $a -} +forbacktickx -0 arg { dollarat -0 } +ifthenelse { test -d $arg } + { find $arg -type f -exec play {} } + { pipeline ffplay -autoexit $arg } diff --git a/bin/xdg-open b/bin/xdg-open @@ -149,7 +149,7 @@ case $1 in exec unrar x "$1" ;; (*.zip) - exec unzip <"$1" + exec unzip "$1" ;; (*.Z) exec uncompress "$1" diff --git a/configure b/configure @@ -1,30 +1,8 @@ #!/bin/sh -ex # install configuration files with symlinks and clone bin -cd "$(dirname "$0")" +cd "$(dirname "$0")/dot" -mkdir -p "$HOME/.gnupg" -ln -fs "/mnt/key/pgp/pubring.gpg" "$HOME/.gnupg/pubring.gpg" -ln -fs "/mnt/key/pgp/secring.gpg" "$HOME/.gnupg/secring.gpg" - -mkdir -p "$HOME/.config/enchive/" -ln -fs "/mnt/key/enchive.pub" "$HOME/.config/enchive/enchive.pub" -ln -fs "/mnt/key/enchive.sec" "$HOME/.config/enchive/enchive.sec" - -mkdir -p "$HOME/.ssh/" -cp "$PWD/dot/authorized_keys" "$HOME/.ssh/authorized_keys" -ln -fs "$PWD/dot/ssh" "$HOME/.ssh/config" - -mkdir -p "$HOME/.config/git/" -ln -fs "$PWD/dot/git" "$HOME/.config/git/config" - -mkdir -p "$HOME/.mblaze/" -ln -fs "$PWD/dot/mblaze" "$HOME/.mblaze/profile" - -ln -fs "$PWD/dot/mpoprc" "$HOME/.mpoprc" -ln -fs "$PWD/dot/msmtprc" "$HOME/.msmtprc" -ln -fs "$PWD/dot/profile" "$HOME/.profile" -ln -fs "$PWD/dot/xinitrc" "$HOME/.xinitrc" - -ln -fs "$HOME/.profile" "$HOME/.bash_profile" -ln -fs "$HOME/.profile" "$HOME/.bashrc" +find * -type d -exec sh -c 'mkdir -p "$HOME/.$0"' {} ';' -o \ + -type f -exec sh -c 'ln -sf "$PWD/$0" "$HOME/.$0"' {} ';' #-o \ +# -type l -exec sh -c 'ln -sf "$(readlink "$0")" "$HOME/.$0"' {} ';' diff --git a/dot/bash_profile b/dot/bash_profile @@ -0,0 +1 @@ +.profile+ \ No newline at end of file diff --git a/dot/bashrc b/dot/bashrc @@ -0,0 +1 @@ +.profile+ \ No newline at end of file diff --git a/dot/git b/dot/config/git/config diff --git a/dot/enchive/enchive.pub b/dot/enchive/enchive.pub @@ -0,0 +1 @@ +/mnt/key/enchive.pub+ \ No newline at end of file diff --git a/dot/enchive/enchive.sec b/dot/enchive/enchive.sec @@ -0,0 +1 @@ +/mnt/key/enchive.sec+ \ No newline at end of file diff --git a/dot/gnupg/pubring.gpg b/dot/gnupg/pubring.gpg @@ -0,0 +1 @@ +/mnt/key/pgp/pubring.gpg+ \ No newline at end of file diff --git a/dot/gnupg/secring.gpg b/dot/gnupg/secring.gpg @@ -0,0 +1 @@ +/mnt/key/pgp/secring.gpg+ \ No newline at end of file diff --git a/dot/mblaze b/dot/mblaze @@ -1,3 +0,0 @@ -Sendmail: msmtp -Local-Mailbox: postmaster@josuah.test -Outbox: ./mail/ diff --git a/dot/mblaze/profile b/dot/mblaze/profile @@ -0,0 +1,3 @@ +Sendmail: msmtp +Local-Mailbox: mail@josuah.net +Outbox: ./mail/ diff --git a/dot/msmtprc b/dot/msmtprc @@ -2,12 +2,12 @@ defaults tls off tls_certcheck off -account postmaster@josuah.test -host josuah.test -from josuah@josuah.test -#user josuah@josuah.test +account mail@josuah.net +host kley.josuah.net +from mail@josuah.net +#user mail@josuah.net auth off #passwordeval "echo" logfile /dev/stderr -account default : postmaster@josuah.test +account default : mail@josuah.net diff --git a/dot/ssh b/dot/ssh @@ -1,45 +0,0 @@ -AddKeysToAgent yes -ServerAliveInterval 30 - -host ::1 - IdentityFile /mnt/key/josuah.key - -host localhost - IdentityFile /mnt/key/josuah.key - -host 127.0.0.1 - IdentityFile /mnt/key/josuah.key - -host 192.168.* - IdentityFile /mnt/key/josuah.key - -host 192.168.0.11 - IdentityFile /mnt/key/josuah.key - -host 199.247.28.162 - IdentityFile /mnt/key/josuah.key - -host nas.josuah.net - IdentityFile /mnt/key/josuah.key - -host rpi.josuah.net - IdentityFile /mnt/key/josuah.key - -host bitreich.org - IdentityFile /mnt/key/josuah.key - -host josuah.net - IdentityFile /mnt/key/josuah.key - -host git.nixers.net - IdentityFile /mnt/key/git.nixers.net.key - -host repo.or.cz - IdentityFile /mnt/key/repo.or.cz.key - -host github.com - IdentityFile /mnt/key/github.com.key - -host git.epitech.eu - IdentityFile /mnt/key/epitech.eu.key - ConnectTimeout 3 diff --git a/dot/authorized_keys b/dot/ssh/authorized_keys diff --git a/dot/ssh/config b/dot/ssh/config @@ -0,0 +1,42 @@ +AddKeysToAgent yes +ServerAliveInterval 30 + +host ::1 + IdentityFile /mnt/key/josuah.key + +host localhost + IdentityFile /mnt/key/josuah.key + +host 127.0.0.1 + IdentityFile /mnt/key/josuah.key + +host 192.168.* + IdentityFile /mnt/key/josuah.key + +host 192.168.0.11 + IdentityFile /mnt/key/josuah.key + +host 199.247.28.162 + IdentityFile /mnt/key/josuah.key + +host bitreich.org + IdentityFile /mnt/key/josuah.key + +host josuah.net + IdentityFile /mnt/key/josuah.key + +host *.josuah.net + IdentityFile /mnt/key/josuah.key + +host git.nixers.net + IdentityFile /mnt/key/git.nixers.net.key + +host repo.or.cz + IdentityFile /mnt/key/repo.or.cz.key + +host github.com + IdentityFile /mnt/key/github.com.key + +host git.epitech.eu + IdentityFile /mnt/key/epitech.eu.key + ConnectTimeout 3 diff --git a/mirror b/mirror @@ -1,18 +0,0 @@ -#!/bin/sh -e - -cd /data/git/ - -git-mirror git://josuah.net/bitfly -git-mirror git://josuah.net/conf -git-mirror git://josuah.net/drawille-el -git-mirror git://josuah.net/eel -git-mirror git://josuah.net/ff2txt -git-mirror git://josuah.net/hty -git-mirror git://josuah.net/ics2txt -git-mirror git://josuah.net/iomenu -git-mirror git://josuah.net/josuah.net -git-mirror git://josuah.net/ploot -git-mirror git://josuah.net/plstree -git-mirror git://josuah.net/tttml - -chown -R /data/git/ diff --git a/s6/qmail-smtpd/run b/s6/qmail-smtpd/run @@ -3,6 +3,17 @@ fdmove -c 2 1 +foreground { if { test ! -d ./data/key/ } + if { mkdir -p ./data/key/ } + cd ./data/key/ + if { openssl req -x509 -newkey rsa:4096 -days 365 -keyout key -out pem } + if { openssl dhparam -out dhp 4096 } +} +if { chmod -R 500 ./data/key/ } +if { chmod 400 ./data/key/key ./data/key/pem ./data/key/dhp } + +s6-envdir ./env/ + s6-envuidgid qmaild s6-tcpserver -U 0.0.0.0 25 diff --git a/s6/qmail-smtpd/tls b/s6/qmail-smtpd/tls @@ -0,0 +1,8 @@ +#!/bin/sh -e + +openssl req -x509 -newkey rsa:4096 -days 365 -keyout key -out pem +chmod 400 key +chmod 444 pem + +openssl dhparam -out dhp 4096 +chmod 444 dhp diff --git a/s6/qmail/data/control/defaultdelivery b/s6/qmail/data/control/defaultdelivery @@ -1 +1 @@ -./mail/ +./mail/INBOX diff --git a/s6/tls/log/run b/s6/tls-server/log/run diff --git a/s6/tls/run b/s6/tls-server/run diff --git a/user/collectd/add b/user/collectd/add @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh -ex # hold the collectd stats mkdir -p /data/collectd diff --git a/user/dns/add b/user/dns/add @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh -ex # data directory for djbdns useradd dns diff --git a/user/git/add b/user/git/add @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh -ex # git repositories mkdir -p /data/git/ diff --git a/user/josuah/add b/user/josuah/add @@ -0,0 +1,3 @@ +#!/bin/sh -ex + +user diff --git a/user/qmail/add b/user/qmail/add @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -ex # qmail control and queues mkdir -p /s6/qmail/data/ diff --git a/user/tor/add b/user/tor/add @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh -ex # tor router and hidden services mkdir -p /data/tor/ diff --git a/user/u9fs/add b/user/u9fs/add @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh -ex # files served through 9P by u9fs mkdir -p /data/u9fs/ diff --git a/user/venti/add b/user/venti/add @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh -ex # venti storage server useradd -d /data/venti/ venti