NixOS configs for new Redbrick deployment
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 
Cian Butler 5a4ff8d355 Update 'README.md' vor 1 Jahr
common Change TLD to redbrick.dcu.ie vor 1 Jahr
hosts Fix rainloop vor 1 Jahr
packages/httpd-error-pages fix building error page vor 1 Jahr
services trailing / are important and quote everything vor 1 Jahr
.gitignore Add working phpfpm config for first few users vor 1 Jahr
LICENSE Add license vor 1 Jahr
README.md Update 'README.md' vor 1 Jahr

README.md

NixOS Configurations

Repo Migration

This repo has been moved to https://github.com/redbrick/nix-configs so as to avoid circular dependecies

Used to deploy redbrick 2.0

Installation

cd /etc/nixos
tar -cjf ~/nixos_backup.tar.bz2 *
rm *
git clone $THIS_REPO .
ln -s hosts/$(hostname)/configuration.nix .
nixos-rebuild switch

Deploying Apache/httpd

users.nix needs to be generated before deploying Apache. Use this command:

cd services/httpd
ldapsearch -b o=redbrick -h ldap.internal -xLLL objectClass=posixAccount uid homeDirectory gidNumber | python3 ldap2nix.py /storage/webtree/ > users.nix

Then generate the preliminary certs for every domain so that httpd can start:

# List all acme-selfsigned-* services and put them in a txt file. Do this with `systemctl status acme-selfsigned-<tab>`
cat selfsigned-svcs.txt | xargs systemctl start

Now apache will start. Generate the real certs for each domain, one at a time as to not get rate limited

cd /var/lib/acme
for cert in *; do journalctl -fu acme-$cert.service & systemctl start acme-$cert.service && kill $!; done
systemctl reload httpd