oof
This commit is contained in:
8
Makefile
8
Makefile
@@ -1,12 +1,12 @@
|
|||||||
.PHONY: help certs matrix-user switch
|
.PHONY: help certs matrix-user switch
|
||||||
|
|
||||||
help: ## Show this help
|
help:
|
||||||
@grep -E '^[a-zA-Z_-]+:.*##' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
@grep -E '^[a-zA-Z_-]+:.*##' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
||||||
|
|
||||||
switch: ## Rebuild and switch NixOS configuration
|
switch:
|
||||||
sudo nixos-rebuild switch --flake .#haschel
|
sudo nixos-rebuild switch --flake .#haschel
|
||||||
|
|
||||||
certs: ## Renew certs for any hosts that don't have a cert yet
|
certs:
|
||||||
@for unit in $$(systemctl list-units 'acme-order-renew-*' --all --plain --no-legend --state=inactive --state=failed | awk '{print $$1}'); do \
|
@for unit in $$(systemctl list-units 'acme-order-renew-*' --all --plain --no-legend --state=inactive --state=failed | awk '{print $$1}'); do \
|
||||||
domain=$$(echo "$$unit" | sed 's/acme-order-renew-//;s/\.service//'); \
|
domain=$$(echo "$$unit" | sed 's/acme-order-renew-//;s/\.service//'); \
|
||||||
if [ ! -f "/var/lib/acme/$$domain/fullchain.pem" ]; then \
|
if [ ! -f "/var/lib/acme/$$domain/fullchain.pem" ]; then \
|
||||||
@@ -17,7 +17,7 @@ certs: ## Renew certs for any hosts that don't have a cert yet
|
|||||||
wait; \
|
wait; \
|
||||||
echo "Done. Check status with: systemctl list-units 'acme-order-renew-*' --all --state=failed"
|
echo "Done. Check status with: systemctl list-units 'acme-order-renew-*' --all --state=failed"
|
||||||
|
|
||||||
matrix-user: ## Register a new Matrix user interactively
|
matrix-user:
|
||||||
@nix shell nixpkgs#matrix-synapse -c register_new_matrix_user \
|
@nix shell nixpkgs#matrix-synapse -c register_new_matrix_user \
|
||||||
-k "$$(sudo cat /var/lib/matrix-synapse/registration_shared_secret)" \
|
-k "$$(sudo cat /var/lib/matrix-synapse/registration_shared_secret)" \
|
||||||
http://localhost:8008
|
http://localhost:8008
|
||||||
|
|||||||
Reference in New Issue
Block a user