nixos: modules: dns: set default dns by timezone
This commit is contained in:
parent
ba214509cb
commit
6ce0c41baf
2 changed files with 6 additions and 3 deletions
|
@ -9,7 +9,12 @@ in {
|
|||
myFlake.nixos.networking.dns = {
|
||||
provider = lib.mkOption {
|
||||
type = lib.types.enum ["google" "alidns"];
|
||||
default = "google";
|
||||
default =
|
||||
{
|
||||
"Asia/Shanghai" = "alidns";
|
||||
}
|
||||
.${config.time.timeZone}
|
||||
or "google";
|
||||
example = "alidns";
|
||||
description = "Select desired DNS provider.";
|
||||
};
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
users.users."guanranwang" = {
|
||||
|
@ -21,7 +20,6 @@
|
|||
};
|
||||
|
||||
programs.fish.enable = true;
|
||||
myFlake.nixos.networking.dns.provider = lib.mkDefault "alidns";
|
||||
users.groups."nix-access-tokens" = {};
|
||||
nix.extraOptions = "!include ${config.sops.secrets.nix-access-tokens.path}";
|
||||
|
||||
|
|
Loading…
Reference in a new issue