lol

nixos/coredns: add extraArgs option

+8 -1
+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 + 33 + extraArgs = mkOption { 34 + default = []; 35 + example = [ "-dns.port=53" ]; 36 + type = types.listOf types.str; 37 + description = lib.mdDoc "Extra arguments to pass to coredns."; 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 - ExecStart = "${getBin cfg.package}/bin/coredns -conf=${configFile}"; 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 };