From e8850eff5166ae6f6e56ac11d58cc56491fca255 Mon Sep 17 00:00:00 2001
From: coolneng <akasroua@gmail.com>
Date: Wed, 25 Dec 2019 16:24:10 +0100
Subject: [PATCH] Restart nginx after Gitea

---
 configuration.nix  | 3 ++-
 modules/devops.nix | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/configuration.nix b/configuration.nix
index 5f77455..c97a4c6 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -69,7 +69,7 @@
   # Auto-upgrade the system and reboot if needed
   system.autoUpgrade = {
     enable = true;
-    allowReboot = false;
+    allowReboot = true;
   };
 
   # Enable zeroconf
@@ -86,6 +86,7 @@
   nix.gc = {
     automatic = true;
     dates = "03:15";
+    options = "--delete-older-than 14d";
   };
 
   # Configure fish shell
diff --git a/modules/devops.nix b/modules/devops.nix
index 5d5478a..a8b8b9d 100644
--- a/modules/devops.nix
+++ b/modules/devops.nix
@@ -21,4 +21,7 @@
     appName = "Gitea";
   };
 
+  # Restart nginx after startup
+  systemd.services.gitea.postStart = "systemctl restart nginx";
+
 }