From d4499ed0565d7222016ac8290011cea3ae369f6a Mon Sep 17 00:00:00 2001 From: clerie Date: Sat, 2 Jan 2021 18:19:11 +0100 Subject: [PATCH] Serve bubblesort on web-2 --- configuration/common/default.nix | 5 +++++ hosts/web-2/bubblesort.nix | 13 +++++++++++++ hosts/web-2/configuration.nix | 5 ++++- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 hosts/web-2/bubblesort.nix diff --git a/configuration/common/default.nix b/configuration/common/default.nix index cd788f0..6d96f16 100644 --- a/configuration/common/default.nix +++ b/configuration/common/default.nix @@ -38,6 +38,11 @@ services.openssh.challengeResponseAuthentication = false; services.openssh.permitRootLogin = lib.mkDefault "no"; + security.acme = { + email = "letsencrypt@clerie.de"; + acceptTerms = true; + }; + nixpkgs.overlays = [ (import ../../pkgs/overlay.nix) ]; diff --git a/hosts/web-2/bubblesort.nix b/hosts/web-2/bubblesort.nix new file mode 100644 index 0000000..5994696 --- /dev/null +++ b/hosts/web-2/bubblesort.nix @@ -0,0 +1,13 @@ +{ ... }: +{ + services.nginx.virtualHosts = { + "bubblesort.clerie.de" = { + enableACME = true; + forceSSL = true; + root = fetchGit { + url = "https://git.clerie.de/clerie/bubblesort_js.git"; + rev = "39d54701a11f4fb48d7e023e384a848e6bde5640"; + }; + }; + }; +} diff --git a/hosts/web-2/configuration.nix b/hosts/web-2/configuration.nix index f689390..de14e38 100644 --- a/hosts/web-2/configuration.nix +++ b/hosts/web-2/configuration.nix @@ -5,11 +5,12 @@ [ ./hardware-configuration.nix ../../configuration/common + ./bubblesort.nix ]; boot.loader.grub.enable = true; boot.loader.grub.version = 2; - boot.loader.grub.device = "/dev/vda"; + boot.loader.grub.device = "/dev/sda"; networking.hostName = "web-2"; @@ -30,5 +31,7 @@ recommendedTlsSettings = true; }; + networking.firewall.allowedTCPPorts = [ 80 443 ]; + system.stateVersion = "21.03"; }