this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ft: remove DNSmasq service as it was migrated to core

-71
-4
nix/.config/nixpkgs/darwin/configuration.nix
··· 1 1 { config, pkgs, ... }: 2 2 3 3 { 4 - imports = [ 5 - ./services/dnsmasq.nix 6 - ]; 7 - 8 4 nixpkgs.config.allowUnfree = true; 9 5 nixpkgs.overlays = [ 10 6 (import ../overlays/encpipe.nix)
-67
nix/.config/nixpkgs/darwin/services/dnsmasq.nix
··· 1 - { config, lib, pkgs, ... }: 2 - 3 - with lib; 4 - 5 - let 6 - cfg = config.services.dnsmasq; 7 - mapA = f: attrs: with builtins; attrValues (mapAttrs f attrs); 8 - in 9 - 10 - { 11 - options = { 12 - services.dnsmasq.enable = mkOption { 13 - type = types.bool; 14 - default = false; 15 - description = "Whether to enable DNSmasq."; 16 - }; 17 - 18 - services.dnsmasq.package = mkOption { 19 - type = types.path; 20 - default = pkgs.dnsmasq; 21 - defaultText = "pkgs.dnsmasq"; 22 - description = "This option specifies the dnsmasq package to use."; 23 - }; 24 - 25 - services.dnsmasq.bind = mkOption { 26 - type = types.str; 27 - default = "127.0.0.1"; 28 - description = "This option specifies the interface on which DNSmasq will listen."; 29 - }; 30 - 31 - services.dnsmasq.port = mkOption { 32 - type = types.int; 33 - default = 53; 34 - description = "This option specifies port on which DNSmasq will listen."; 35 - }; 36 - 37 - services.dnsmasq.addresses = mkOption { 38 - type = types.attrs; 39 - default = {}; 40 - description = "List of domains that will be redirected by the DNSmasq"; 41 - }; 42 - }; 43 - 44 - config = mkIf cfg.enable { 45 - environment.systemPackages = [ cfg.package ]; 46 - 47 - launchd.daemons.dnsmasq = { 48 - serviceConfig.ProgramArguments = [ 49 - "${cfg.package}/bin/dnsmasq" 50 - "--listen-address=${cfg.bind}" 51 - "--port=${toString cfg.port}" 52 - "--keep-in-foreground" 53 - ] ++ (mapA (domain: addr: "--address=/${domain}/${addr}") cfg.addresses); 54 - 55 - serviceConfig.KeepAlive = true; 56 - serviceConfig.RunAtLoad = true; 57 - }; 58 - 59 - environment.etc = builtins.listToAttrs (builtins.map (domain: { 60 - name = "resolver/${domain}"; 61 - value = { 62 - enable = true; 63 - text = "nameserver ${cfg.bind}.${toString cfg.port}"; 64 - }; 65 - }) (builtins.attrNames cfg.addresses)); 66 - }; 67 - }