diff options
author | Alan Pearce | 2019-11-11 20:14:18 +0100 |
---|---|---|
committer | Alan Pearce | 2019-11-11 20:16:52 +0100 |
commit | 0b446897e178560307fceecb1ac6a1ab08ebf8ee (patch) | |
tree | b4d657e6b45d21c6c3a6a28c515def5ff5a5efce /system | |
parent | ce2c59088a85f960fde8f0446580ea5f3b8ace8f (diff) | |
download | nixfiles-0b446897e178560307fceecb1ac6a1ab08ebf8ee.tar.lz nixfiles-0b446897e178560307fceecb1ac6a1ab08ebf8ee.tar.zst nixfiles-0b446897e178560307fceecb1ac6a1ab08ebf8ee.zip |
Split network-manager and kresd
Diffstat (limited to 'system')
-rw-r--r-- | system/settings/hardware/network-manager.nix | 22 | ||||
-rw-r--r-- | system/settings/services/kresd.nix | 22 |
2 files changed, 26 insertions, 18 deletions
diff --git a/system/settings/hardware/network-manager.nix b/system/settings/hardware/network-manager.nix index 9b0e2532..ed4f5620 100644 --- a/system/settings/hardware/network-manager.nix +++ b/system/settings/hardware/network-manager.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: -let - nextdnsConfig = "abd6e5"; - hostname = config.networking.hostName; -in { + imports = [ + "../services/kresd.nix"; + ]; + networking = { networkmanager = { enable = true; @@ -15,20 +15,6 @@ in }; }; - services.kresd = { - enable = true; - extraConfig = '' - cache.size = 100*MB - cache.min_ttl(3 * 3600) - - policy.add(policy.all(policy.TLS_FORWARD({ - {'45.90.28.0', hostname='${hostname}-${nextdnsConfig}.dns1.nextdns.io'}, - {'2a07:a8c0::', hostname='${hostname}-${nextdnsConfig}.dns1.nextdns.io'}, - {'45.90.30.0', hostname='${hostname}-${nextdnsConfig}.dns2.nextdns.io'}, - {'2a07:a8c1::', hostname='${hostname}-${nextdnsConfig}.dns2.nextdns.io'} - }))) - ''; - }; environment.systemPackages = with pkgs; [ networkmanagerapplet networkmanager_dmenu diff --git a/system/settings/services/kresd.nix b/system/settings/services/kresd.nix new file mode 100644 index 00000000..335d96cc --- /dev/null +++ b/system/settings/services/kresd.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: + +let + nextdnsConfig = "abd6e5"; + hostname = config.networking.hostName; +in +{ + services.kresd = { + enable = true; + extraConfig = '' + cache.size = 100*MB + cache.min_ttl(3 * 3600) + + policy.add(policy.all(policy.TLS_FORWARD({ + {'45.90.28.0', hostname='${hostname}-${nextdnsConfig}.dns1.nextdns.io'}, + {'2a07:a8c0::', hostname='${hostname}-${nextdnsConfig}.dns1.nextdns.io'}, + {'45.90.30.0', hostname='${hostname}-${nextdnsConfig}.dns2.nextdns.io'}, + {'2a07:a8c1::', hostname='${hostname}-${nextdnsConfig}.dns2.nextdns.io'} + }))) + ''; + }; +} |