mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-12 05:16:25 +03: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 changed files with 4 additions and 13 deletions
|
@ -1,8 +1,6 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.services.clickhouse;
|
cfg = config.services.clickhouse;
|
||||||
confDir = "/etc/clickhouse-server";
|
|
||||||
stateDir = "/var/lib/clickhouse";
|
|
||||||
in
|
in
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
|
@ -43,20 +41,13 @@ with lib;
|
||||||
|
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
|
|
||||||
preStart = ''
|
|
||||||
mkdir -p ${stateDir}
|
|
||||||
chown clickhouse:clickhouse ${confDir} ${stateDir}
|
|
||||||
'';
|
|
||||||
|
|
||||||
script = ''
|
|
||||||
cd "${confDir}"
|
|
||||||
exec ${pkgs.clickhouse}/bin/clickhouse-server
|
|
||||||
'';
|
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "clickhouse";
|
User = "clickhouse";
|
||||||
Group = "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…
Add table
Add a link
Reference in a new issue