From 9163d9191f5f28972aa061cdfad86561d7bf2c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 24 Oct 2023 18:52:38 +0200 Subject: [PATCH 1/3] link to example --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 053104e..05358d2 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,17 @@ This project contains everything to setup yourself a mirror of https://nixos.wiki/ +## Examples + +Checkout [./targets/nixos-wiki2.thalheim.io]() for an example terraform deployment on hetzner cloud. + +## Restoring from an backup + After installing run: ``` systemctl start wiki-backup.service && systemctl start wiki-restore ``` + +Note that `nixos-wiki-backup` will do this restore every night. + From d2e73d80ffefa8c1c9cd481cae110b281e26c793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 24 Oct 2023 18:59:19 +0200 Subject: [PATCH 2/3] fix nginx + firewall --- modules/flake-module.nix | 1 + modules/nixos-wiki/default.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/flake-module.nix b/modules/flake-module.nix index c4e16f6..4f0a296 100644 --- a/modules/flake-module.nix +++ b/modules/flake-module.nix @@ -2,6 +2,7 @@ flake.nixosModules = { hcloud.imports = [ inputs.srvos.nixosModules.server + inputs.srvos.nixosModules.mixins-nginx inputs.sops-nix.nixosModules.sops inputs.srvos.nixosModules.hardware-hetzner-cloud ./single-disk.nix diff --git a/modules/nixos-wiki/default.nix b/modules/nixos-wiki/default.nix index 4c032ba..e492810 100644 --- a/modules/nixos-wiki/default.nix +++ b/modules/nixos-wiki/default.nix @@ -101,6 +101,7 @@ ''; }; + networking.firewall.allowedTCPPorts = [ 443 80 ]; security.acme.acceptTerms = true; services.nginx.virtualHosts.${config.services.mediawiki.nginx.hostName} = { enableACME = lib.mkDefault true; From 2fa03d9042ed463bf925d69a370dc0ea8d7131ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 24 Oct 2023 19:22:00 +0200 Subject: [PATCH 3/3] destroy nixos-wiki2 instance for now --- targets/nixos-wiki2.thalheim.io/nixos-vars.json | 1 - 1 file changed, 1 deletion(-) delete mode 100644 targets/nixos-wiki2.thalheim.io/nixos-vars.json diff --git a/targets/nixos-wiki2.thalheim.io/nixos-vars.json b/targets/nixos-wiki2.thalheim.io/nixos-vars.json deleted file mode 100644 index 6900953..0000000 --- a/targets/nixos-wiki2.thalheim.io/nixos-vars.json +++ /dev/null @@ -1 +0,0 @@ -{"ipv6_address":"2a01:4f9:c012:afb9::1","ssh_keys":["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbBp2dH2X3dcU1zh+xW3ZsdYROKpJd3n13ssOP092qE joerg@turingmachine"]} \ No newline at end of file