From 87949cb97f78dad19743352a584af432a4800e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 3 Apr 2021 19:19:05 +0200 Subject: =?UTF-8?q?Change=20Nath=E2=80=99s=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/private/default.nix | 2 +- modules/private/websites/default.nix | 2 +- modules/private/websites/nath/villon.nix | 42 +++++++++++++++++++++++++++ modules/private/websites/nathanael/villon.nix | 42 --------------------------- 4 files changed, 44 insertions(+), 44 deletions(-) create mode 100644 modules/private/websites/nath/villon.nix delete mode 100644 modules/private/websites/nathanael/villon.nix (limited to 'modules') diff --git a/modules/private/default.nix b/modules/private/default.nix index ddc4281..29814aa 100644 --- a/modules/private/default.nix +++ b/modules/private/default.nix @@ -60,7 +60,7 @@ set = { nassimeProd = ./websites/nassime/production.nix; - nathanaelVillon = ./websites/nathanael/villon.nix; + nathVillon = ./websites/nath/villon.nix; papaMaisonBbc = ./websites/papa/maison_bbc.nix; papaSurveillance = ./websites/papa/surveillance.nix; diff --git a/modules/private/websites/default.nix b/modules/private/websites/default.nix index 530db59..2542e86 100644 --- a/modules/private/websites/default.nix +++ b/modules/private/websites/default.nix @@ -278,7 +278,7 @@ in nassime.production.enable = true; - nathanael.villon.enable = true; + nath.villon.enable = true; papa = { surveillance.enable = true; diff --git a/modules/private/websites/nath/villon.nix b/modules/private/websites/nath/villon.nix new file mode 100644 index 0000000..57a1df5 --- /dev/null +++ b/modules/private/websites/nath/villon.nix @@ -0,0 +1,42 @@ +{ lib, pkgs, config, ... }: +let + cfg = config.myServices.websites.nath.villon; + varDir = "/var/lib/ftp/nath"; + env = config.myEnv.websites.nath; + domain = "sntvillon.immae.eu"; + apacheUser = config.services.httpd.Prod.user; + apacheGroup = config.services.httpd.Prod.group; +in { + options.myServices.websites.nath.villon.enable = lib.mkEnableOption "enable Nath's website"; + + config = lib.mkIf cfg.enable { + services.webstats.sites = [ { name = domain; } ]; + + system.activationScripts.nath_villon = { + deps = [ "users" ]; + text = '' + install -m 0755 -o ${apacheUser} -g ${apacheGroup} -d ${varDir} + ''; + }; + security.acme.certs."ftp".extraDomains."${domain}" = null; + + services.websites.env.production.vhostConfs.nath_villon = { + certName = "nath"; + certMainHost = domain; + hosts = [ domain ]; + root = varDir; + extraConfig = [ + '' + Use Stats ${domain} + + + DirectoryIndex index.htm index.html + Options Indexes FollowSymLinks MultiViews Includes + AllowOverride None + Require all granted + + '' + ]; + }; + }; +} diff --git a/modules/private/websites/nathanael/villon.nix b/modules/private/websites/nathanael/villon.nix deleted file mode 100644 index 7482de1..0000000 --- a/modules/private/websites/nathanael/villon.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ lib, pkgs, config, ... }: -let - cfg = config.myServices.websites.nathanael.villon; - varDir = "/var/lib/ftp/nathanael"; - env = config.myEnv.websites.nathanael; - domain = "sntvillon.immae.eu"; - apacheUser = config.services.httpd.Prod.user; - apacheGroup = config.services.httpd.Prod.group; -in { - options.myServices.websites.nathanael.villon.enable = lib.mkEnableOption "enable Nathanael's website"; - - config = lib.mkIf cfg.enable { - services.webstats.sites = [ { name = domain; } ]; - - system.activationScripts.nathanael_villon = { - deps = [ "users" ]; - text = '' - install -m 0755 -o ${apacheUser} -g ${apacheGroup} -d ${varDir} - ''; - }; - security.acme.certs."ftp".extraDomains."${domain}" = null; - - services.websites.env.production.vhostConfs.nathanael_villon = { - certName = "nathanael"; - certMainHost = domain; - hosts = [ domain ]; - root = varDir; - extraConfig = [ - '' - Use Stats ${domain} - - - DirectoryIndex index.htm index.html - Options Indexes FollowSymLinks MultiViews Includes - AllowOverride None - Require all granted - - '' - ]; - }; - }; -} -- cgit v1.2.3