aboutsummaryrefslogtreecommitdiff
path: root/modules/fcuny-net.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2025-10-13 08:49:12 -0700
committerFranck Cuny <franck@fcuny.net>2025-10-13 08:49:12 -0700
commita495672e9b4e7fbc01296628da61d83e4b0ebaf0 (patch)
tree81fd38ad25c2e8c490b12936c17b711f5d3baaf0 /modules/fcuny-net.nix
parentconsistent home-manager configuration for all nixos hosts (diff)
downloadinfra-a495672e9b4e7fbc01296628da61d83e4b0ebaf0.tar.gz
delete unused module
Diffstat (limited to '')
-rw-r--r--modules/fcuny-net.nix70
1 files changed, 0 insertions, 70 deletions
diff --git a/modules/fcuny-net.nix b/modules/fcuny-net.nix
deleted file mode 100644
index eb5bf95..0000000
--- a/modules/fcuny-net.nix
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- config,
- lib,
- pkgs,
- ...
-}:
-
-let
- cfg = config.services.fcuny-net;
-
- # Import your site - you'll need to adjust the path relative to this module
- fcunyNet = import ../../src/fcuny.net { inherit pkgs; };
-in
-{
- options.services.fcuny-net = {
- enable = lib.mkEnableOption "fcuny.net static site";
-
- domain = lib.mkOption {
- type = lib.types.str;
- default = "fcuny.net";
- description = "Domain name for the site";
- };
-
- port = lib.mkOption {
- type = lib.types.port;
- default = 80;
- description = "Port to serve the site on";
- };
-
- enableSSL = lib.mkOption {
- type = lib.types.bool;
- default = false;
- description = "Enable SSL/TLS with Let's Encrypt";
- };
- };
-
- config = lib.mkIf cfg.enable {
- services.nginx = {
- enable = true;
- virtualHosts.${cfg.domain} = {
- root = fcunyNet.site;
-
- # SSL configuration
- enableACME = cfg.enableSSL;
- forceSSL = cfg.enableSSL;
-
- locations."/" = {
- tryFiles = "$uri $uri/ =404";
- };
-
- extraConfig = ''
- # Cache static assets
- location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg)$ {
- expires 1y;
- add_header Cache-Control "public, immutable";
- }
- '';
- };
- };
-
- # Open firewall
- networking.firewall.allowedTCPPorts = [ cfg.port ] ++ lib.optional cfg.enableSSL 443;
-
- # ACME/Let's Encrypt setup if SSL is enabled
- security.acme = lib.mkIf cfg.enableSSL {
- acceptTerms = true;
- defaults.email = "franck@fcuny.net";
- };
- };
-}