about summary refs log tree commit diff
path: root/modules/services
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2023-07-25 17:43:07 +0900
committersefidel <contact@sefidel.net>2023-07-25 18:26:26 +0900
commit543ff5b6b2df05c3c294e9a8272bd40dc8c9fed2 (patch)
tree830bd70ce70887ac0a1823efe7d4dc020791b998 /modules/services
parent30648c71eddb7dbc13e8d0e771f909be823f1f04 (diff)
downloadinfra-543ff5b6b2df05c3c294e9a8272bd40dc8c9fed2.tar.gz
infra-543ff5b6b2df05c3c294e9a8272bd40dc8c9fed2.zip
feat(modules)!: cleanup unused modules
Diffstat (limited to 'modules/services')
-rw-r--r--modules/services/pubnix.nix20
-rw-r--r--modules/services/userweb.nix36
2 files changed, 0 insertions, 56 deletions
diff --git a/modules/services/pubnix.nix b/modules/services/pubnix.nix
deleted file mode 100644
index dfe3d58..0000000
--- a/modules/services/pubnix.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-with lib;
-let
-  cfg = config.modules.services.pubnix;
-in
-{
-  options.modules.services.pubnix = {
-    enable = mkEnableOption "serve pubnix shell";
-  };
-
-  config = mkIf cfg.enable {
-    nix.gc.automatic = true;
-    nix.gc.dates = "daily";
-
-    environment.systemPackages = with pkgs; [
-      bsd-finger
-    ];
-  };
-}
diff --git a/modules/services/userweb.nix b/modules/services/userweb.nix
deleted file mode 100644
index 1477f59..0000000
--- a/modules/services/userweb.nix
+++ /dev/null
@@ -1,36 +0,0 @@
-{ config, lib, ... }:
-
-with lib;
-let
-  cfg = config.modules.services.userweb;
-in
-{
-  options.modules.services.userweb = {
-    enable = mkEnableOption "serve user web contents";
-    domain = mkOption { type = types.str; };
-  };
-
-  config = mkIf cfg.enable {
-    modules.services.nginx.enable = true;
-
-    services.nginx.virtualHosts.${cfg.domain} = {
-      forceSSL = true;
-      useACMEHost = cfg.domain;
-
-      serverName = "${cfg.domain} www.${cfg.domain}";
-
-      locations."~ ^/(~u/)(?<user>[\w-]+)(?<user_uri>/.*)?$" = {
-        alias = "/home/$user/public_html$user_uri";
-        index = "index.html index.php index.cgi index.py index.sh index.pl index.lua";
-
-        extraConfig = ''
-          error_page 404 /~$user/404.html;
-        '';
-      };
-
-      extraConfig = ''
-        error_log /var/log/nginx/${cfg.domain}-error.log crit;
-      '';
-    };
-  };
-}