summaryrefslogtreecommitdiff
path: root/hosts/ahmed/nofitications.linus.onl
diff options
context:
space:
mode:
authorLinnnus <[email protected]>2024-02-20 19:00:53 +0100
committerLinnnus <[email protected]>2024-02-20 19:01:44 +0100
commit274e08f50faffe1b8e4a760811b0a12450eae719 (patch)
tree393449e81f21b6f6b1ea7a701cef0f740cc3b757 /hosts/ahmed/nofitications.linus.onl
parent1bbdd3f63a9d8c46b1772cbf2ad9fd83d7ef213b (diff)
Merge 'reorg' into 'main'
This patch moves in the reorganizational work done on the reorg branch, mainly: * Move host-specific modules into hosts/<host>/<module> * Break up HM config See the reorg branch for the individual commits.
Diffstat (limited to 'hosts/ahmed/nofitications.linus.onl')
-rw-r--r--hosts/ahmed/nofitications.linus.onl/default.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/hosts/ahmed/nofitications.linus.onl/default.nix b/hosts/ahmed/nofitications.linus.onl/default.nix
new file mode 100644
index 0000000..f3ab04f
--- /dev/null
+++ b/hosts/ahmed/nofitications.linus.onl/default.nix
@@ -0,0 +1,24 @@
+{ ... }: let
+ # Enable HTTPS stuff.
+ useACME = true;
+in {
+ config = {
+ # Start the proxied service.
+ services.push-notification-api = {
+ enable = true;
+ };
+
+ # Register domain name.
+ services.cloudflare-dyndns.domains = ["notifications.linus.onl"];
+
+ # Use NGINX as reverse proxy.
+ services.nginx.virtualHosts."notifications.linus.onl" = {
+ enableACME = useACME;
+ forceSSL = useACME;
+ locations."/" = {
+ recommendedProxySettings = true;
+ proxyPass = "http://unix:/run/push-notification-api.sock";
+ };
+ };
+ };
+}