From e34a2333a79b5a564418019da5e3dd5506e4f86a Mon Sep 17 00:00:00 2001 From: Darren 'Tadgy' Austin Date: Sat, 30 Sep 2023 17:45:44 +0100 Subject: [PATCH] Initial commit. --- .gitignore | 20 +++++ README | 3 - etc/.gitignore | 102 ++++++++++++++++++++++++ etc/autofs/.gitignore | 6 ++ etc/autofs/auto.master.d/storage.autofs | 1 + etc/autofs/auto.storage | 5 ++ etc/certificates/.gitignore | 6 ++ etc/cron.daily/.gitignore | 2 + etc/cron.daily/warn-git-status | 9 +++ etc/fstab | 3 + etc/group | 34 ++++++++ etc/gshadow.gpg | Bin 0 -> 253 bytes etc/hostname | 1 + etc/locale.conf | 2 + etc/mail.conf | 21 +++++ etc/msmtp-aliases | 1 + etc/msmtprc | 13 +++ etc/rc.conf | 47 +++++++++++ etc/shadow.gpg | 2 + etc/ssh/.gitignore | 5 ++ etc/ssh/ssh_host_ecdsa_key.gpg | Bin 0 -> 459 bytes etc/ssh/ssh_host_ecdsa_key.pub | 1 + etc/ssh/ssh_host_ed25519_key.gpg | 2 + etc/ssh/ssh_host_ed25519_key.pub | 1 + etc/ssh/ssh_host_rsa_key.gpg | Bin 0 -> 2065 bytes etc/ssh/ssh_host_rsa_key.pub | 1 + etc/sudoers.d/defaults | 2 + etc/sudoers.d/root-access | 2 + etc/sudoers.d/wheel | 1 + var/.gitignore | 12 +++ var/spool/.gitignore | 2 + var/spool/cron/root | 5 ++ 32 files changed, 309 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README create mode 100644 etc/.gitignore create mode 100644 etc/autofs/.gitignore create mode 100644 etc/autofs/auto.master.d/storage.autofs create mode 100644 etc/autofs/auto.storage create mode 100644 etc/certificates/.gitignore create mode 100644 etc/cron.daily/.gitignore create mode 100755 etc/cron.daily/warn-git-status create mode 100644 etc/fstab create mode 100644 etc/group create mode 100644 etc/gshadow.gpg create mode 100644 etc/hostname create mode 100644 etc/locale.conf create mode 100644 etc/mail.conf create mode 100644 etc/msmtp-aliases create mode 100644 etc/msmtprc create mode 100644 etc/rc.conf create mode 100644 etc/shadow.gpg create mode 100644 etc/ssh/.gitignore create mode 100644 etc/ssh/ssh_host_ecdsa_key.gpg create mode 100644 etc/ssh/ssh_host_ecdsa_key.pub create mode 100644 etc/ssh/ssh_host_ed25519_key.gpg create mode 100644 etc/ssh/ssh_host_ed25519_key.pub create mode 100644 etc/ssh/ssh_host_rsa_key.gpg create mode 100644 etc/ssh/ssh_host_rsa_key.pub create mode 100644 etc/sudoers.d/defaults create mode 100644 etc/sudoers.d/root-access create mode 100644 etc/sudoers.d/wheel create mode 100644 var/.gitignore create mode 100644 var/spool/.gitignore create mode 100644 var/spool/cron/root diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c69be9e --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +bin +boot/ +data/ +dev/ +home/ +lib +lib32 +lib64 +lost+found/ +media/ +mnt/ +opt/ +proc/ +root/ +run/ +sbin +srv/ +sys/ +tmp/ +usr/ diff --git a/README b/README deleted file mode 100644 index f10b50a..0000000 --- a/README +++ /dev/null @@ -1,3 +0,0 @@ -System configurations are stored in a seperate branch for each host or purpose. - -Check out (git checkout) the appropriate branch to find the configurations. diff --git a/etc/.gitignore b/etc/.gitignore new file mode 100644 index 0000000..95bd876 --- /dev/null +++ b/etc/.gitignore @@ -0,0 +1,102 @@ +*~ +*.lock +*.orig +*.OLD +acpi/ +bash/ +bindresvport.blacklist +ca-certificates/ +ca-certificates.conf +colors/ +cron.d/ +cron.hourly/ +cron.monthly/ +cron.weekly/ +crypttab +cups/ +dbus-1/ +default/ +depmod.d/ +dhcpcd.conf +dns/ +dracut.conf +dracut.conf.d/ +e2scrub.conf +environment +ethertypes +exports +exports.d/ +filesystems +fonts/ +gai.conf +group- +grub.d/ +gshadow +gshadow- +gtk-3.0/ +host.conf +hosts +idmapd.conf +inputrc +iproute2/ +iptables/ +issue +kernel.d/ +ld.so.conf +ld.so.conf.d/ +libnl/ +localtime +login.defs +lvm/ +lynx.cfg +lynx.lss +mail.rc +mailx.rc +man.conf +mke2fs.conf +modprobe.d/ +modules-load.d/ +mtab +netconfig +nsswitch.conf +ntp.conf +os-release +pam.d/ +passwd +passwd- +pkcs11/ +profile +profile.d/ +protocols +rc.local +rc.shutdown* +resolv.conf +rpc +runit/ +screenrc +securetty +security/ +services +shadow +shadow- +shells +skel/ +ssl/ +subgid +subgid- +subuid +subuid- +sudo.conf +sudoers +sudoers.dist +sv/ +sysctl.conf +sysctl.d/ +udev/ +vmware-tools/ +wpa_supplicant/ +xattr.conf +xbps.d/ +xdg/ +xtables.conf +zzz.d/ diff --git a/etc/autofs/.gitignore b/etc/autofs/.gitignore new file mode 100644 index 0000000..ec790fe --- /dev/null +++ b/etc/autofs/.gitignore @@ -0,0 +1,6 @@ +auto.master +auto.misc +auto.net* +auto.smb* +autofs.conf +autofs_ldap_auth.conf diff --git a/etc/autofs/auto.master.d/storage.autofs b/etc/autofs/auto.master.d/storage.autofs new file mode 100644 index 0000000..bb5f2e1 --- /dev/null +++ b/etc/autofs/auto.master.d/storage.autofs @@ -0,0 +1 @@ +/data /etc/autofs/auto.storage browse diff --git a/etc/autofs/auto.storage b/etc/autofs/auto.storage new file mode 100644 index 0000000..c6c58d7 --- /dev/null +++ b/etc/autofs/auto.storage @@ -0,0 +1,5 @@ +home -vers=4,hard,acl,rw,fsc 192.168.67.245:/home +media -vers=4,hard,acl,rw,fsc 192.168.67.245:/data/media +slackware -vers=4,hard,acl,rw,fsc 192.168.67.245:/data/slackware +tmp -vers=4,hard,acl,rw,fsc 192.168.67.245:/data/tmp +www -vers=4,hard,acl,rw,fsc 192.168.67.245:/data/www diff --git a/etc/certificates/.gitignore b/etc/certificates/.gitignore new file mode 100644 index 0000000..dbd311a --- /dev/null +++ b/etc/certificates/.gitignore @@ -0,0 +1,6 @@ +_DH_.pem +_msmtp_-afterdark.lan-cert.pem +_msmtp_-afterdark.lan-key.pem +_msmtp_-afterdark.lan-key.pem.gpg +_msmtp_-cert.pem +_msmtp_-key.pem diff --git a/etc/cron.daily/.gitignore b/etc/cron.daily/.gitignore new file mode 100644 index 0000000..fa4de9b --- /dev/null +++ b/etc/cron.daily/.gitignore @@ -0,0 +1,2 @@ +makewhatis +shadow diff --git a/etc/cron.daily/warn-git-status b/etc/cron.daily/warn-git-status new file mode 100755 index 0000000..d274574 --- /dev/null +++ b/etc/cron.daily/warn-git-status @@ -0,0 +1,9 @@ +#!/bin/bash + +source /etc/mail.conf "git-status" || exit 1 + +CONFIGSTATUS="$(cd / && git status | egrep -ve "^(On branch|Your branch|No commits|nothing|$)" -e "\(use")" + +[[ -z "$CONFIGSTATUS" ]] && exit 0 + +mailx "${MAILX_ARGS[@]}" -r "$EMAIL_FROM" -s "git statuses" "${EMAIL_TO[@]}" <<<"$CONFIGSTATUS" diff --git a/etc/fstab b/etc/fstab new file mode 100644 index 0000000..bc08dbe --- /dev/null +++ b/etc/fstab @@ -0,0 +1,3 @@ +UUID=55f6f46d-b408-4416-994d-faadde6c54aa / ext4 defaults 0 1 +UUID=e87a8703-cc91-446b-84a4-17b38194b3d2 none swap defaults 0 0 +tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0 diff --git a/etc/group b/etc/group new file mode 100644 index 0000000..216de73 --- /dev/null +++ b/etc/group @@ -0,0 +1,34 @@ +root:x:0: +bin:x:1: +sys:x:2: +kmem:x:3: +wheel:x:4:tadgy +tty:x:5: +tape:x:6: +daemon:x:7: +floppy:x:8: +disk:x:9: +lp:x:10: +dialout:x:11: +audio:x:12: +video:x:13: +utmp:x:14: +adm:x:15: +cdrom:x:16: +optical:x:17: +mail:x:18: +storage:x:19: +scanner:x:20: +network:x:21: +kvm:x:24: +input:x:25: +plugdev:x:26: +usbmon:x:27: +sgx:x:28: +nogroup:x:99: +users:x:100: +admin:x:101:tadgy +_dhcpcd:x:999: +_uuidd:x:998: +ntpd:x:997: +rpc:x:996: diff --git a/etc/gshadow.gpg b/etc/gshadow.gpg new file mode 100644 index 0000000000000000000000000000000000000000..e878cb2dd0a157e66b80ba41f8cc395b5f55974c GIT binary patch literal 253 zcmVpP{AGTiDt@6^qD*^dqNJGmAq<}^o&TK;18DPWr zSK2~?^!{_!t$q1i)~95+ED4Y;3Kw^g&;e-wI4OcLM%Do9Wu7vNAU76C3>tDBnnsU1 z#mzQEolaasha{${*sAxU>smX_P~O$DamDb?k6Pa<`jwg9eR-|BZvGOvCw1)G$r(L- z>HQlee?=)|U6^p*krKoOzVc$tX)WYH{7VP4{sm|1^+WMR;QRm2=13J!k%$x+)I{Ko zu$Z1Nypax_YxsAvg6~R>Lz*Gs8_55=i!Up19tE4n&sEH3y8E@^U^pBzhP$ylQ}TQi DgGqm* literal 0 HcmV?d00001 diff --git a/etc/hostname b/etc/hostname new file mode 100644 index 0000000..f3bc7a0 --- /dev/null +++ b/etc/hostname @@ -0,0 +1 @@ +chuckie.afterdark.lan diff --git a/etc/locale.conf b/etc/locale.conf new file mode 100644 index 0000000..87227b3 --- /dev/null +++ b/etc/locale.conf @@ -0,0 +1,2 @@ +LANG=en_GB.UTF-8 +LC_COLLATE=C diff --git a/etc/mail.conf b/etc/mail.conf new file mode 100644 index 0000000..28e24e6 --- /dev/null +++ b/etc/mail.conf @@ -0,0 +1,21 @@ +# This file is sourced by various scripts that need to send emails. + +case "$(hostname -d)" in + afterdark.lan) + EMAIL_DOMAIN="afterdark.org.uk" + ;; + *) + EMAIL_DOMAIN="slackware.network" + ;; +esac + +EMAIL_FROM="${HOSTNAME%%.*} " +EMAIL_TO=("Systems Administrator ") + +case "$1" in + sbosrcarch) + MAILX_ARGS=("-c" "Urchlay ") + ;; +esac + +true diff --git a/etc/msmtp-aliases b/etc/msmtp-aliases new file mode 100644 index 0000000..4e078fa --- /dev/null +++ b/etc/msmtp-aliases @@ -0,0 +1 @@ +default: sysadmin@afterdark.org.uk diff --git a/etc/msmtprc b/etc/msmtprc new file mode 100644 index 0000000..7bcf3b9 --- /dev/null +++ b/etc/msmtprc @@ -0,0 +1,13 @@ +account default +host gw.afterdark.lan +timeout 300 +domain chuckie.afterdark.lan +tls off +tls_starttls off +tls_trust_file /etc/ssl/certs/ca-certificates.crt +tls_cert_file /etc/certificates/_msmtp_-cert.pem +tls_key_file /etc/certificates/_msmtp_-key.pem +auto_from on +maildomain afterdark.org.uk +syslog LOG_MAIL +aliases /etc/msmtp-aliases diff --git a/etc/rc.conf b/etc/rc.conf new file mode 100644 index 0000000..723d29d --- /dev/null +++ b/etc/rc.conf @@ -0,0 +1,47 @@ +# /etc/rc.conf - system configuration for void + +# Set the host name. +# +# NOTE: it's preferred to declare the hostname in /etc/hostname instead: +# - echo myhost > /etc/hostname +# +#HOSTNAME="void-live" + +# Set RTC to UTC or localtime. +HARDWARECLOCK="UTC" + +# Set timezone, availables timezones can be found at /usr/share/zoneinfo. +# +# NOTE: it's preferred to set the timezone in /etc/localtime instead: +# - ln -sf /usr/share/zoneinfo/ /etc/localtime +# Setting the timezone here requires a reboot to apply any changes/fixes +# and read-write access to the filesystem. +# +#TIMEZONE="Europe/Madrid" + +# Keymap to load, see loadkeys(8). +KEYMAP=uk + +# Console font to load, see setfont(8). +#FONT="lat9w-16" + +# Console map to load, see setfont(8). +#FONT_MAP= + +# Font unimap to load, see setfont(8). +#FONT_UNIMAP= + +# Amount of ttys which should be setup. +#TTYS= + +# Set the mode for cgroup mounts. +# hybrid: mount cgroup v1 under /sys/fs/cgroup and +# cgroup v2 under /sys/fs/cgroup/unified +# legacy: mount cgroup v1 /sys/fs/cgroup +# unified: mount cgroup v2 under /sys/fs/cgroup +#CGROUP_MODE=hybrid + +# Set this to true only if you do not want seed files to actually credit the +# RNG, for example if you plan to replicate this file system image and do not +# have the wherewithal to first delete the contents of /var/lib/seedrng. +#SEEDRNG_SKIP_CREDIT=false diff --git a/etc/shadow.gpg b/etc/shadow.gpg new file mode 100644 index 0000000..754d592 --- /dev/null +++ b/etc/shadow.gpg @@ -0,0 +1,2 @@ +  BSbv|,e.~ުKF=!GXwsfJL%co"zyO7٥H{蘤kss;NBWBGdθD@ U1fcre!ok>Uw.@ƉGHt /H[ӵu0_R~wMBw(@/BM{ž4Q2;|FhVCW.z=wK?$MGtffL1r$yG~+bw1e|r z09TqAS?>ghxXkf#2tq%Atz(!>;=H{0UIgcNFEe9e@5G1`#CjJOeHd}C2`L|6a1ivr zV)-N>At70ZxuUzJN{dw#5kjU!AkuJX zU{RdT07eL)HVQiNh!c#2@O0hp70wHkh)1b2n=|W3(g{DWk zx3lesJng00v%X2iH}^fgnRNNZy;eO>{rDiTvMOuj(6H%+aJDZl$!o&@dhA|xN=8WZ zy2Xa^VJWhavezdTXQHLTHfg!Qx9nZkRhTD$Hsf(`9tKmj{e}e!l^Lj3C&<# zSXIYm?vD%JVHhUAbz&P;AwStjvK_wd2s;~BAdEXh2#@?Q B-ZB6H literal 0 HcmV?d00001 diff --git a/etc/ssh/ssh_host_ecdsa_key.pub b/etc/ssh/ssh_host_ecdsa_key.pub new file mode 100644 index 0000000..b385ae3 --- /dev/null +++ b/etc/ssh/ssh_host_ecdsa_key.pub @@ -0,0 +1 @@ +ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBG+VCvLAdhS4yFB+KisMidAUZP6QSMOHWbEAK2194VAVdowZi/dJDNfH59QbEtI7wJ+y35pX5fXExWXbinUnKP0= root@void-live diff --git a/etc/ssh/ssh_host_ed25519_key.gpg b/etc/ssh/ssh_host_ed25519_key.gpg new file mode 100644 index 0000000..9a54c6e --- /dev/null +++ b/etc/ssh/ssh_host_ed25519_key.gpg @@ -0,0 +1,2 @@ +  HiX۫*lX;aN0bC{J+eﺝ,~ 4 M{w)&q2ā؜=SDA[p\i!o@'4D㓼Rm9Y: \Ak}ehzwY{0̾χft7v_̻ziC@>kIaIs0]7kjSտdBªo_V[䱙dޢ-~h5ϢbҌrTĘ"n۳%Gfւ^Q[Iv7l('p4?Т)g{MS3MdO-{-k +f Iz{&@U&S \ No newline at end of file diff --git a/etc/ssh/ssh_host_ed25519_key.pub b/etc/ssh/ssh_host_ed25519_key.pub new file mode 100644 index 0000000..2a88a93 --- /dev/null +++ b/etc/ssh/ssh_host_ed25519_key.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIETA3xleyhRRvvu/+RzMsacrAo9YQiPW0LYXojch+V9D root@void-live diff --git a/etc/ssh/ssh_host_rsa_key.gpg b/etc/ssh/ssh_host_rsa_key.gpg new file mode 100644 index 0000000000000000000000000000000000000000..9937fc2d9bb6c8c28985986bb2f2e24fbcf2e449 GIT binary patch literal 2065 zcmV+s2=4cc4Fm}T2uU0tj!G09O!Cs|0nD5D*ACWD?O1Kh6%^p0b<$qkQmu49@b1O+ zTu3fBh1F;H4beKT`j>HCL!-wsi%DLj!ZV1|VRg;VZS@NwtcKpNb zy@J6>L8W?>z+UBlw_c;VJ#DFCz5_Jmz|Gi)lkvl=E{L`z{ zU@_0OG|u7UYWP@l2{KsLE_{SRzbq2`ON9{~3{Du9$}FqV_VC4R-rMK&o;Rz@md^*) zX1+CI-bZpY6tl_URfxZ8Dii^Wb&az=PGp5{pygZUcx)i!5yBLHAZB2q5AVz#M!9~L zCpvox%R&Q5AvAOpb;!#?7XJeI+q%2eNjlXCzympzJB71uD-po87 zo0{-#7EpoBW95=4I}^V6*xOtT61rL`=}%3X1Y_@30UN2UEug_!u4#rR+=75A(=a|1 z*VZa1XFVzUig8~Y&RAys<)O9UYYjNf{*omlfqSpck#bn%muld~g)D;@d0oaZ_A|T_ z+M@$Cai9n`TC04Qflw+wx+>lI#^b#SvFyZ|+kSa1v<9F_)`4Zv)y%YAE z#GGB(+Jx?ViiD13Z<@c{9j7EWsI~NM0PHN&M$G*xtetnQ`x3Q_oy5gRbZ)Ea*Ze_L zcX*vl=E{xt8hI(ouXI}0TN7|;{nI`uUI}?f;ki*y)cS13PYoZS>4(W?9dq=FwP(T6(LQ69rSH702A%aNLlk?ID6-uqXk7Fnj?18oB0+K# z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