]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/default.nix
Add new machine to nixops
[perso/Immae/Config/Nix.git] / modules / private / websites / default.nix
index e2bcef5269aac642ca39ecb4dff7ffe1134e4a8a..119d62e565251a45687bad76cc06d708a2c10e55 100644 (file)
@@ -64,15 +64,19 @@ let
   makeExtraConfig = (builtins.filter (x: x != null) (lib.attrsets.mapAttrsToList (n: v: v.extraConfig or null) apacheConfig));
 in
 {
-  options.myServices.websites.webappDirs = lib.mkOption {
-    type = lib.types.attrsOf lib.types.path;
-    description = ''
-      Webapp paths to create in /run/current-system/webapps
-      '';
-    default = {};
+  options.myServices.websites = {
+    enable = lib.mkEnableOption "enable websites";
+
+    webappDirs = lib.mkOption {
+      type = lib.types.attrsOf lib.types.path;
+      description = ''
+        Webapp paths to create in /run/current-system/webapps
+        '';
+      default = {};
+    };
   };
 
-  config = {
+  config = lib.mkIf config.myServices.websites.enable {
     services.backup.profiles.php = {
       rootDir = "/var/lib/php";
     };