Merge staging-next into staging

This commit is contained in:
github-actions[bot]
2021-05-04 12:23:31 +00:00
committed by GitHub
8 changed files with 66 additions and 18 deletions
@@ -403,9 +403,7 @@ in
requires = [ "munged.service" "mysql.service" ];
preStart = ''
cp ${slurmdbdConf} ${configPath}
chmod 600 ${configPath}
chown ${cfg.user} ${configPath}
install -m 600 -o ${cfg.user} -T ${slurmdbdConf} ${configPath}
${optionalString (cfg.dbdserver.storagePassFile != null) ''
echo "StoragePass=$(cat ${cfg.dbdserver.storagePassFile})" \
>> ${configPath}
+8 -6
View File
@@ -4,23 +4,25 @@ with lib;
let
runDir = "/run/searx";
cfg = config.services.searx;
settingsFile = pkgs.writeText "settings.yml"
(builtins.toJSON cfg.settings);
generateConfig = ''
cd ${runDir}
# write NixOS settings as JSON
cat <<'EOF' > settings.yml
${builtins.toJSON cfg.settings}
EOF
(
umask 077
cp --no-preserve=mode ${settingsFile} settings.yml
)
# substitute environment variables
env -0 | while IFS='=' read -r -d ''' n v; do
sed "s#@$n@#$v#g" -i settings.yml
done
# set strict permissions
chmod 400 settings.yml
'';
settingType = with types; (oneOf