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 = {
|
myFlake.nixos.networking.dns = {
|
||||||
provider = lib.mkOption {
|
provider = lib.mkOption {
|
||||||
type = lib.types.enum ["google" "alidns"];
|
type = lib.types.enum ["google" "alidns"];
|
||||||
default = "google";
|
default =
|
||||||
|
{
|
||||||
|
"Asia/Shanghai" = "alidns";
|
||||||
|
}
|
||||||
|
.${config.time.timeZone}
|
||||||
|
or "google";
|
||||||
example = "alidns";
|
example = "alidns";
|
||||||
description = "Select desired DNS provider.";
|
description = "Select desired DNS provider.";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
lib,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
users.users."guanranwang" = {
|
users.users."guanranwang" = {
|
||||||
|
@ -21,7 +20,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
myFlake.nixos.networking.dns.provider = lib.mkDefault "alidns";
|
|
||||||
users.groups."nix-access-tokens" = {};
|
users.groups."nix-access-tokens" = {};
|
||||||
nix.extraOptions = "!include ${config.sops.secrets.nix-access-tokens.path}";
|
nix.extraOptions = "!include ${config.sops.secrets.nix-access-tokens.path}";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue