From 8f904d0d982684e8e66dfc5d9123712eb96bf16e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 12 May 2019 17:57:20 +0200 Subject: Refactor a bit httpd/webapps configuration: - alias private to pkgs - move default apache vhost to pkgs --- pkgs/webapps/apache-theme/default.nix | 8 +++++--- pkgs/webapps/default.nix | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'pkgs/webapps') diff --git a/pkgs/webapps/apache-theme/default.nix b/pkgs/webapps/apache-theme/default.nix index b679afe..4b5755a 100644 --- a/pkgs/webapps/apache-theme/default.nix +++ b/pkgs/webapps/apache-theme/default.nix @@ -1,10 +1,12 @@ { theme_root ? null }: rec { theme = ./theme; - apacheConfig = '' + apacheConfig = let + theme_root' = if isNull theme_root then theme else theme_root; + in '' - Alias /theme ${if isNull theme_root then theme else theme_root} - + Alias /theme ${theme_root'} + Options -Indexes AllowOverride None Require all granted diff --git a/pkgs/webapps/default.nix b/pkgs/webapps/default.nix index 8151b8d..8c3eb0e 100644 --- a/pkgs/webapps/default.nix +++ b/pkgs/webapps/default.nix @@ -1,4 +1,4 @@ -{ callPackage, mylibs, composerEnv, lib }: +{ callPackage, mylibs, composerEnv, lib, private }: rec { adminer = callPackage ./adminer {}; apache-theme = callPackage ./apache-theme {}; @@ -111,4 +111,4 @@ rec { in lib.attrsets.genAttrs names (name: callPackage (./yourls/plugins + "/${name}") { inherit mylibs; }); -} +} // private.webapps -- cgit v1.2.3