diff --git a/infra/README.org b/infra/README.org index fd19322..6633ea0 100644 --- a/infra/README.org +++ b/infra/README.org @@ -29,7 +29,7 @@ infrastructure. | Machine | Proxmox | Description | Deployment | |---------+-------------+------------------------+------------| | vm02116 | Procolix | Forgejo | ~git~ | -| vm02117 | Procolix | Web server | ~web~ | +| vm02117 | Procolix | /unused/ | ~other~ | | vm02179 | Procolix | /unused/ | ~other~ | | vm02186 | Procolix | /unused/ | ~other~ | | vm02187 | Procolix | Wiki | ~web~ | diff --git a/infra/flake-part.nix b/infra/flake-part.nix index c2a154e..ac31975 100644 --- a/infra/flake-part.nix +++ b/infra/flake-part.nix @@ -51,24 +51,6 @@ providers.local = inputs.nixops4-nixos.modules.nixops4Provider.local; resources = { - vm02117 = { - type = providers.local.exec; - imports = [ inputs.nixops4-nixos.modules.nixops4Resource.nixos ]; - ssh = { - host = "185.206.232.106"; - opts = ""; - hostPublicKey = self.keys.systems.vm02117; - }; - nixpkgs = inputs.nixpkgs; - nixos.module = { - imports = [ - ./vm02117 - self.nixosModules.ageSecrets - { fediversity.hostPublicKey = self.keys.systems.vm02117; } - ]; - }; - }; - vm02187 = { type = providers.local.exec; imports = [ inputs.nixops4-nixos.modules.nixops4Resource.nixos ]; @@ -95,6 +77,24 @@ providers.local = inputs.nixops4-nixos.modules.nixops4Provider.local; resources = { + vm02117 = { + type = providers.local.exec; + imports = [ inputs.nixops4-nixos.modules.nixops4Resource.nixos ]; + ssh = { + host = "185.206.232.106"; + opts = ""; + hostPublicKey = self.keys.systems.vm02117; + }; + nixpkgs = inputs.nixpkgs; + nixos.module = { + imports = [ + ./vm02117 + self.nixosModules.ageSecrets + { fediversity.hostPublicKey = self.keys.systems.vm02117; } + ]; + }; + }; + vm02179 = { type = providers.local.exec; imports = [ inputs.nixops4-nixos.modules.nixops4Resource.nixos ]; diff --git a/infra/vm02117/website.nix b/infra/vm02117/website.nix deleted file mode 100644 index 856cfe5..0000000 --- a/infra/vm02117/website.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ - services.nginx.enable = true; - - services.nginx.virtualHosts."www.oid.foundation" = { - useACMEHost = "oid.foundation"; - forceSSL = true; - globalRedirect = "oid.foundation"; - }; - - services.nginx.virtualHosts."oid.foundation" = { - enableACME = true; - forceSSL = true; - root = "/var/www/oid.foundation"; - - }; - - services.nginx.virtualHosts."fediversity.eu" = { - useACMEHost = "www.fediversity.eu"; - forceSSL = true; - globalRedirect = "www.fediversity.eu"; - locations."/.well-known/matrix/client" = { - extraConfig = '' - return 200 '{"m.homeserver": {"base_url": "https://matrix.fediversity.eu", "public_baseurl": "https://matrix.fediversity.eu"}}'; - default_type application/json; - add_header Access-Control-Allow-Origin "*"; - add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"; - add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization"; - ''; - }; - locations."/.well-known/matrix/server" = { - extraConfig = '' - return 200 '{"m.server": "matrix.fediversity.eu:443"}'; - default_type application/json; - add_header Access-Control-Allow-Origin "*"; - add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"; - add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization"; - ''; - }; - }; - - services.nginx.virtualHosts."www.fediversity.eu" = { - enableACME = true; - forceSSL = true; - root = "${(import ../../website { }).build}"; - locations."/.well-known/matrix/client" = { - extraConfig = '' - return 200 '{"m.homeserver": {"base_url": "https://matrix.fediversity.eu", "public_baseurl": "https://matrix.fediversity.eu"}}'; - default_type application/json; - add_header Access-Control-Allow-Origin "*"; - add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"; - add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization"; - ''; - }; - locations."/.well-known/matrix/server" = { - extraConfig = '' - return 200 '{"m.server": "matrix.fediversity.eu:443"}'; - default_type application/json; - add_header Access-Control-Allow-Origin "*"; - add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"; - add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Authorization"; - ''; - }; - }; - - security.acme = { - acceptTerms = true; - defaults.email = "beheer@procolix.com"; - certs."www.fediversity.eu".extraDomainNames = [ "fediversity.eu" ]; - certs."oid.foundation".extraDomainNames = [ "www.oid.foundation" ]; - }; -}