diff --git a/configuration.nix b/configuration.nix index 4e851ed..5bb5826 100644 --- a/configuration.nix +++ b/configuration.nix @@ -133,6 +133,11 @@ with pkgs; owner = "63026"; group = "63026"; }; + secrets.telegram = { + file = secrets/telegram.age; + owner = "matrix-as-telegram"; + group = "matrix-as-telegram"; + }; identityPaths = [ "/home/coolneng/.ssh/id_ed25519" ]; }; diff --git a/modules/communication.nix b/modules/communication.nix index df3fe66..1129962 100644 --- a/modules/communication.nix +++ b/modules/communication.nix @@ -55,6 +55,11 @@ in { port = 8118; format = "mautrix-python"; package = mautrix-telegram; + serviceConfig.EnvironmentFile = config.age.secrets.telegram.path; + settings.telegram = { + api_id = "$API_ID"; + api_hash = "$API_HASH"; + }; }; facebook = { port = 8228; diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 1fc745d..b096ce4 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -11,4 +11,5 @@ in { "git.age".publicKeys = [ zion ]; "dendrite.age".publicKeys = [ zion ]; "dendrite-postgres.age".publicKeys = [ zion ]; + "telegram.age".publicKeys = [ zion ]; } diff --git a/secrets/telegram.age b/secrets/telegram.age new file mode 100644 index 0000000..c421392 --- /dev/null +++ b/secrets/telegram.age @@ -0,0 +1,7 @@ +age-encryption.org/v1 +-> ssh-ed25519 iUaRGg rS8ZNqVEL6bTwP8tQZBGhBGrnO7+kYaccfF4L4BOvD8 +YdRIGI3ZcCj2ChmG9EEWoeaJjFGpuAdynVOX9AmlNPQ +-> _"qP0Q-grease m!90McQ, +huj0QunueHMxUR/1rkmH +--- 37HKb796va0m2v12DIa8edo4s35P3MSNY2WDNjagawo +§Ë-þŠÍ˜ÊŒ·Ã˜×C'{ñ(*S€Gs¬çÙ8«Öü¥³W!¶´ S^o<¡yóI¦X,¼=^ö )ÇõþFaÕÉ̸_…?†Ø6Xg^l»l*#oQOZ \ No newline at end of file