]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/emilia/production.nix
Move personal websites to modules
[perso/Immae/Config/Nix.git] / modules / private / websites / emilia / production.nix
similarity index 90%
rename from nixops/modules/websites/emilia/default.nix
rename to modules/private/websites/emilia/production.nix
index 47257b7a2f1e668b74db880a71341f08211cedfb..2e705a1e5d57d6bde750e47579cda9d96607de62 100644 (file)
@@ -1,6 +1,6 @@
 { lib, pkgs, config, myconfig,  ... }:
 let
-    cfg = config.services.myWebsites.Emilia;
+    cfg = config.myServices.websites.emilia.production;
     env = myconfig.env.websites.emilia;
     varDir = "/var/lib/moodle";
     siteDir = ./moodle;
@@ -40,13 +40,9 @@ let
       // it is intentional because it prevents trailing whitespace problems!
       '';
 in {
-  options.services.myWebsites.Emilia = {
-    production = {
-      enable = lib.mkEnableOption "enable Emilia's website";
-    };
-  };
+  options.myServices.websites.emilia.production.enable = lib.mkEnableOption "enable Emilia's website";
 
-  config = lib.mkIf cfg.production.enable {
+  config = lib.mkIf cfg.enable {
     system.activationScripts.emilia = ''
       install -m 0755 -o wwwrun -g wwwrun -d ${varDir}
       '';