diff --git a/home-manager/git.nix b/home-manager/git.nix index da832f83..cf2173c3 100644 --- a/home-manager/git.nix +++ b/home-manager/git.nix @@ -12,7 +12,7 @@ enable = true; userName = "Thiago Kenji Okada"; - userEmail = "thiagokokada@gmail.com"; + userEmail = config.meta.email; package = pkgs.gitFull.override { # Use SSH from macOS instead with support for Keyring # https://github.com/NixOS/nixpkgs/issues/62353 diff --git a/modules/meta.nix b/modules/meta.nix index 61c94565..fa15b273 100644 --- a/modules/meta.nix +++ b/modules/meta.nix @@ -8,6 +8,11 @@ with lib; type = types.str; default = "thiagoko"; }; + email = mkOption { + description = "Main e-mail"; + type = types.str; + default = "thiagokokada@gmail.com"; + }; configPath = mkOption { description = "Location of this config"; type = types.path; diff --git a/nixos/server/duckdns-updater.nix b/nixos/server/duckdns-updater.nix index b5ebdd6e..18c96aa2 100644 --- a/nixos/server/duckdns-updater.nix +++ b/nixos/server/duckdns-updater.nix @@ -114,7 +114,7 @@ in acceptTerms = true; certs.${cfg.domain} = { inherit group; - email = "thiagokokada@gmail.com"; + inherit (config.meta) email; dnsProvider = lib.mkIf (!cfg.certs.useHttpServer) "duckdns"; credentialsFile = lib.mkIf (!cfg.certs.useHttpServer) cfg.environmentFile; listenHTTP = lib.mkIf cfg.certs.useHttpServer ":${toString httpPort}"; # any other port needs to be proxied