]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - nixops/modules/websites/capitaines/default.nix
Move personal websites to modules
[perso/Immae/Config/Nix.git] / nixops / modules / websites / capitaines / default.nix
diff --git a/nixops/modules/websites/capitaines/default.nix b/nixops/modules/websites/capitaines/default.nix
deleted file mode 100644 (file)
index 4bbf488..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-{ lib, pkgs, config, myconfig,  ... }:
-let
-    cfg = config.services.myWebsites.Capitaines;
-    env = myconfig.env.websites.capitaines;
-    webappName = "capitaines_mastodon";
-    root = "/run/current-system/webapps/${webappName}";
-    siteDir = ./mastodon_static;
-in {
-  options.services.myWebsites.Capitaines = {
-    production = {
-      enable = lib.mkEnableOption "enable Capitaines's website";
-    };
-  };
-
-  config = lib.mkIf cfg.production.enable {
-    system.extraSystemBuilderCmds = ''
-      mkdir -p $out/webapps
-      ln -s ${siteDir} $out/webapps/${webappName}
-      '';
-
-    services.websites.production.vhostConfs.capitaines_mastodon = {
-      certName     = "capitaines";
-      certMainHost = "mastodon.capitaines.fr";
-      hosts        = [ "mastodon.capitaines.fr" ];
-      root         = root;
-      extraConfig  = [
-        ''
-        ErrorDocument 404 /index.html
-        <Directory ${root}>
-          DirectoryIndex index.html
-          Options Indexes FollowSymLinks MultiViews Includes
-          Require all granted
-        </Directory>
-          ''
-      ];
-    };
-
-    services.websites.production.vhostConfs.capitaines = {
-      certName   = "capitaines";
-      addToCerts = true;
-      hosts      = [ "capitaines.fr" ];
-      root       = "/run/current-system/webapps/_www";
-      extraConfig = [ ''
-        <Directory /run/current-system/webapps/_www>
-          DirectoryIndex index.htm
-          Require all granted
-        </Directory>
-        '' ];
-    };
-  };
-}