diff options
Diffstat (limited to 'modules/services')
-rw-r--r-- | modules/services/pubnix.nix | 20 | ||||
-rw-r--r-- | modules/services/userweb.nix | 36 |
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; - ''; - }; - }; -} |