From 34c7b88e16d1768b1b9a0cfa6dd21ea5d9b1b308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 8 May 2020 23:59:21 +0200 Subject: Use new withPlugin system - dokuwiki - mantisbt - mediagoblin - roundcube - ttrss - yourls --- modules/webapps/mediagoblin.nix | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) (limited to 'modules/webapps') diff --git a/modules/webapps/mediagoblin.nix b/modules/webapps/mediagoblin.nix index dbc4c2b..19bbc2e 100644 --- a/modules/webapps/mediagoblin.nix +++ b/modules/webapps/mediagoblin.nix @@ -15,8 +15,8 @@ let [app:mediagoblin] use = egg:mediagoblin#app - config = ${cfg.configFile} ${cfg.workdir}/mediagoblin.ini - /mgoblin_static = ${cfg.workdir}/mediagoblin/static + config = ${cfg.configFile} ${cfg.package}/mediagoblin.ini + /mgoblin_static = ${cfg.package}/mediagoblin/static [loggers] keys = root @@ -87,26 +87,13 @@ in package = lib.mkOption { type = lib.types.package; default = pkgs.webapps.mediagoblin; + example = lib.literalExample '' + pkgs.webapps.mediagoblin.withPlugins (p: [p.basicsearch]) + ''; description = '' Mediagoblin package to use. ''; }; - plugins = lib.mkOption { - type = lib.types.listOf lib.types.package; - default = []; - description = '' - Mediagoblin plugins to use. - ''; - }; - # Output variables - workdir = lib.mkOption { - type = lib.types.package; - default = cfg.package.withPlugins cfg.plugins; - description = '' - Adjusted Mediagoblin package with plugins - ''; - readOnly = true; - }; systemdStateDirectory = lib.mkOption { type = lib.types.str; # Use ReadWritePaths= instead if varDir is outside of /var/lib @@ -187,7 +174,7 @@ in preStart = '' if [ -d ${cfg.dataDir}/plugin_static/ ]; then rm ${cfg.dataDir}/plugin_static/coreplugin_basic_auth - ln -sf ${cfg.workdir}/mediagoblin/plugins/basic_auth/static ${cfg.dataDir}/plugin_static/coreplugin_basic_auth + ln -sf ${cfg.package}/mediagoblin/plugins/basic_auth/static ${cfg.dataDir}/plugin_static/coreplugin_basic_auth fi ./bin/gmg -cf ${cfg.configFile} dbupdate ''; @@ -198,7 +185,7 @@ in Restart = "always"; TimeoutSec = 15; Type = "simple"; - WorkingDirectory = cfg.workdir; + WorkingDirectory = cfg.package; RuntimeDirectory = cfg.systemdRuntimeDirectory; StateDirectory= cfg.systemdStateDirectory; PIDFile = cfg.pids.paster; @@ -227,7 +214,7 @@ in Restart = "always"; TimeoutSec = 60; Type = "simple"; - WorkingDirectory = cfg.workdir; + WorkingDirectory = cfg.package; RuntimeDirectory = cfg.systemdRuntimeDirectory; StateDirectory= cfg.systemdStateDirectory; PIDFile = cfg.pids.celery; -- cgit v1.2.3