mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 09:14:28 +00:00
nixos/clickhouse: replace deprecated usage of PermissionsStartOnly
see https://github.com/NixOS/nixpkgs/issues/53852
This commit is contained in:
parent
e5d8ba59cc
commit
e51f86a018
@ -1,8 +1,6 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.clickhouse;
|
||||
confDir = "/etc/clickhouse-server";
|
||||
stateDir = "/var/lib/clickhouse";
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
@ -43,20 +41,13 @@ with lib;
|
||||
|
||||
after = [ "network.target" ];
|
||||
|
||||
preStart = ''
|
||||
mkdir -p ${stateDir}
|
||||
chown clickhouse:clickhouse ${confDir} ${stateDir}
|
||||
'';
|
||||
|
||||
script = ''
|
||||
cd "${confDir}"
|
||||
exec ${pkgs.clickhouse}/bin/clickhouse-server
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
User = "clickhouse";
|
||||
Group = "clickhouse";
|
||||
PermissionsStartOnly = true;
|
||||
ConfigurationDirectory = "clickhouse-server";
|
||||
StateDirectory = "clickhouse";
|
||||
LogsDirectory = "clickhouse";
|
||||
ExecStart = "${pkgs.clickhouse}/bin/clickhouse-server --config-file=${pkgs.clickhouse}/etc/clickhouse-server/config.xml";
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user