diff options
author | Léo Gaspard <leo@gaspard.io> | 2020-01-09 03:49:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-09 03:49:03 +0100 |
commit | b31660e5bbe2ee2acbec3c1552d516c4d387c392 (patch) | |
tree | 04ac350ab4dc29eb903a28aff6eb829eb4a27dc7 /nixos/modules/services/web-apps/restya-board.nix | |
parent | 665fee312a03aac0db9a61cc302a51626288c7c2 (diff) | |
parent | 1b28e47ae107ded7e2837787a376e5abb15152b5 (diff) | |
download | nixpkgs-b31660e5bbe2ee2acbec3c1552d516c4d387c392.tar nixpkgs-b31660e5bbe2ee2acbec3c1552d516c4d387c392.tar.gz nixpkgs-b31660e5bbe2ee2acbec3c1552d516c4d387c392.tar.bz2 nixpkgs-b31660e5bbe2ee2acbec3c1552d516c4d387c392.tar.lz nixpkgs-b31660e5bbe2ee2acbec3c1552d516c4d387c392.tar.xz nixpkgs-b31660e5bbe2ee2acbec3c1552d516c4d387c392.tar.zst nixpkgs-b31660e5bbe2ee2acbec3c1552d516c4d387c392.zip |
Merge branch 'master' into ihatemoney
Diffstat (limited to 'nixos/modules/services/web-apps/restya-board.nix')
-rw-r--r-- | nixos/modules/services/web-apps/restya-board.nix | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/nixos/modules/services/web-apps/restya-board.nix b/nixos/modules/services/web-apps/restya-board.nix index f220669c910..9d0a3f65253 100644 --- a/nixos/modules/services/web-apps/restya-board.nix +++ b/nixos/modules/services/web-apps/restya-board.nix @@ -116,7 +116,7 @@ in }; passwordFile = mkOption { - type = types.nullOr types.str; + type = types.nullOr types.path; default = null; description = '' The database user's password. 'null' if no password is set. @@ -216,7 +216,6 @@ in index index.html index.php; gzip on; - gzip_disable "msie6"; gzip_comp_level 6; gzip_min_length 1100; @@ -236,7 +235,7 @@ in locations."/".root = "${runDir}/client"; - locations."~ \.php$" = { + locations."~ \\.php$" = { tryFiles = "$uri =404"; extraConfig = '' include ${pkgs.nginx}/conf/fastcgi_params; @@ -247,7 +246,7 @@ in ''; }; - locations."~* \.(css|js|less|html|ttf|woff|jpg|jpeg|gif|png|bmp|ico)" = { + locations."~* \\.(css|js|less|html|ttf|woff|jpg|jpeg|gif|png|bmp|ico)" = { root = "${runDir}/client"; extraConfig = '' if (-f $request_filename) { @@ -286,7 +285,7 @@ in sed -i "s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', 'restya');/g" "${runDir}/server/php/config.inc.php" '' else '' sed -i "s/^.*'R_DB_HOST'.*$/define('R_DB_HOST', '${cfg.database.host}');/g" "${runDir}/server/php/config.inc.php" - sed -i "s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', '$(<${cfg.database.dbPassFile})');/g" "${runDir}/server/php/config.inc.php" + sed -i "s/^.*'R_DB_PASSWORD'.*$/define('R_DB_PASSWORD', ${if cfg.database.passwordFile == null then "''" else "'file_get_contents(${cfg.database.passwordFile})'"});/g" "${runDir}/server/php/config.inc.php ''} sed -i "s/^.*'R_DB_PORT'.*$/define('R_DB_PORT', '${toString cfg.database.port}');/g" "${runDir}/server/php/config.inc.php" sed -i "s/^.*'R_DB_NAME'.*$/define('R_DB_NAME', '${cfg.database.name}');/g" "${runDir}/server/php/config.inc.php" |