From 5b22e8e88dd35ad160d6e947f56a85e486083a2a Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Sat, 7 Oct 2023 15:48:53 +0200 Subject: [PATCH] feat(compute01): Enable wordpress --- machines/web01/_configuration.nix | 2 +- machines/web01/wordpress/default.nix | 11 +++++++++++ machines/web01/wordpress/lavoixduntexte.nix | 12 ++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 machines/web01/wordpress/default.nix create mode 100644 machines/web01/wordpress/lavoixduntexte.nix diff --git a/machines/web01/_configuration.nix b/machines/web01/_configuration.nix index d592051..e831d78 100644 --- a/machines/web01/_configuration.nix +++ b/machines/web01/_configuration.nix @@ -11,7 +11,7 @@ lib.extra.mkConfig { "metis" "linkal" "plausible" - # "wordpress" + "wordpress" ]; root = ./.; diff --git a/machines/web01/wordpress/default.nix b/machines/web01/wordpress/default.nix new file mode 100644 index 0000000..f34dd15 --- /dev/null +++ b/machines/web01/wordpress/default.nix @@ -0,0 +1,11 @@ +{ ... }: + +{ + imports = [ + ./lavoixduntexte.nix + ]; + + services.wordpress = { + webserver = "nginx"; + }; +} diff --git a/machines/web01/wordpress/lavoixduntexte.nix b/machines/web01/wordpress/lavoixduntexte.nix new file mode 100644 index 0000000..b0a0538 --- /dev/null +++ b/machines/web01/wordpress/lavoixduntexte.nix @@ -0,0 +1,12 @@ +_: + +let host = "lavoixduntexte.normalesup.eu"; + +in { + services.wordpress.sites.${host} = { database.tablePrefix = "wp_lvdt_"; }; + + services.nginx.virtualHosts.${host} = { + enableACME = true; + forceSSL = true; + }; +}