From 543ff5b6b2df05c3c294e9a8272bd40dc8c9fed2 Mon Sep 17 00:00:00 2001 From: sefidel Date: Tue, 25 Jul 2023 17:43:07 +0900 Subject: feat(modules)!: cleanup unused modules --- modules/services/pubnix.nix | 20 -------------------- modules/services/userweb.nix | 36 ------------------------------------ 2 files changed, 56 deletions(-) delete mode 100644 modules/services/pubnix.nix delete mode 100644 modules/services/userweb.nix (limited to 'modules/services') 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/)(?[\w-]+)(?/.*)?$" = { - 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; - ''; - }; - }; -} -- cgit 1.4.1