tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos/coredns: add extraArgs option
Bjørn Forsman
2 years ago
e5b8b12a
55e30da2
+8
-1
1 changed file
expand all
collapse all
unified
split
nixos
modules
services
networking
coredns.nix
+8
-1
nixos/modules/services/networking/coredns.nix
···
29
29
type = types.package;
30
30
description = lib.mdDoc "Coredns package to use.";
31
31
};
32
32
+
33
33
+
extraArgs = mkOption {
34
34
+
default = [];
35
35
+
example = [ "-dns.port=53" ];
36
36
+
type = types.listOf types.str;
37
37
+
description = lib.mdDoc "Extra arguments to pass to coredns.";
38
38
+
};
32
39
};
33
40
34
41
config = mkIf cfg.enable {
···
44
51
AmbientCapabilities = "cap_net_bind_service";
45
52
NoNewPrivileges = true;
46
53
DynamicUser = true;
47
47
-
ExecStart = "${getBin cfg.package}/bin/coredns -conf=${configFile}";
54
54
+
ExecStart = "${getBin cfg.package}/bin/coredns -conf=${configFile} ${lib.escapeShellArgs cfg.extraArgs}";
48
55
ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR1 $MAINPID";
49
56
Restart = "on-failure";
50
57
};