From cd942d253bda8f511fdb921ea29f69f382a9368e Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Fri, 8 Mar 2024 10:50:28 +0530 Subject: repo: restructure source tree --- hosts/dspace/modules/network.nix | 18 ------------------ hosts/dspace/modules/www.nix | 39 --------------------------------------- 2 files changed, 57 deletions(-) delete mode 100644 hosts/dspace/modules/network.nix delete mode 100644 hosts/dspace/modules/www.nix (limited to 'hosts/dspace/modules') diff --git a/hosts/dspace/modules/network.nix b/hosts/dspace/modules/network.nix deleted file mode 100644 index 007cfba..0000000 --- a/hosts/dspace/modules/network.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ ... }: - -let - wan = "ens18"; -in -{ - networking = { - interfaces.${wan}.ipv4.addresses = [{ - address = "10.0.8.107"; - prefixLength = 16; - }]; - defaultGateway = { - address = "10.0.0.1"; - interface = wan; - }; - nameservers = [ "10.0.0.2" "10.0.0.3" ]; - }; -} diff --git a/hosts/dspace/modules/www.nix b/hosts/dspace/modules/www.nix deleted file mode 100644 index 90ab841..0000000 --- a/hosts/dspace/modules/www.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ config, ... }: - -let - domain = "dsp.fscusat.ac.in"; -in -{ - networking.firewall.allowedTCPPorts = [ 80 443 ]; - - sops.secrets = let - opts = { - owner = config.services.nginx.user; - group = config.services.nginx.group; - }; - in{ - "cusat.ac.in/key" = opts; - "cusat.ac.in/crt" = opts; - }; - - services.nginx = { - enable = true; - recommendedTlsSettings = true; - recommendedZstdSettings = true; - recommendedOptimisation = true; - recommendedGzipSettings = true; - recommendedProxySettings = true; - recommendedBrotliSettings = true; - - virtualHosts.${domain} = { - forceSSL = true; - sslCertificateKey = config.sops.secrets."cusat.ac.in/key".path; - sslCertificate = config.sops.secrets."cusat.ac.in/crt".path; - - locations."/" = { - return = "200 '

under construction

'"; - extraConfig = "add_header Content-Type text/html;"; - }; - }; - }; -} -- cgit v1.2.3