nsd: add stateDir option to nsd config.

Previously, it was hardcoded to /var/lib/nsd, which remains the default
value.
This commit is contained in:
niten 2021-11-08 15:59:39 -08:00
parent e74894146a
commit 116d999001
1 changed files with 9 additions and 1 deletions

View File

@ -6,7 +6,7 @@ let
cfg = config.services.nsd;
username = "nsd";
stateDir = "/var/lib/nsd";
stateDir = cfg.stateDir;
pidFile = stateDir + "/var/nsd.pid";
# build nsd with the options needed for the given config
@ -411,6 +411,14 @@ let
'';
};
stateDir = mkOption {
type = types.str;
default = "/var/lib/nsd";
description = ''
Directory at which to store NSD state.
'';
};
zoneStats = mkOption {
type = types.nullOr types.str;
default = null;