diff --git a/modules/services/gitlab-runner.nix b/modules/services/gitlab-runner.nix index 329fd72..11de998 100644 --- a/modules/services/gitlab-runner.nix +++ b/modules/services/gitlab-runner.nix @@ -19,6 +19,7 @@ let # make config file readable by service chown -R --reference=$HOME $(dirname ${configPath}) '' else '' + set -e export CONFIG_FILE=${configPath} mkdir -p $(dirname ${configPath}) @@ -92,8 +93,8 @@ let done # update global options - remarshal --if toml --of json ${configPath} \ - | jq -cM ${escapeShellArg (concatStringsSep " | " [ + tomlq -t \ + ${escapeShellArg (concatStringsSep " | " [ ".check_interval = ${toJSON cfg.checkInterval}" ".concurrent = ${toJSON cfg.concurrent}" ".sentry_dsn = ${toJSON cfg.sentryDSN}" @@ -103,9 +104,9 @@ let ".session_server.session_timeout = ${toJSON cfg.sessionServer.sessionTimeout}" "del(.[] | nulls)" "del(.session_server[] | nulls)" - ])} \ - | remarshal --if json --of toml \ - | sponge ${configPath} + ])} ${configPath} \ + > config.toml.new + mv config.toml.new ${configPath} # make config file readable by service chown -R --reference=$HOME $(dirname ${configPath}) @@ -559,7 +560,7 @@ in gawk jq moreutils - remarshal + yq # util-linux cfg.package coreutils