about summary refs log tree commit diff
path: root/users/tazjin/nixos/modules/tgsa.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/tazjin/nixos/modules/tgsa.nix')
-rw-r--r--users/tazjin/nixos/modules/tgsa.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/users/tazjin/nixos/modules/tgsa.nix b/users/tazjin/nixos/modules/tgsa.nix
index ac6d940c2a..e162e0d822 100644
--- a/users/tazjin/nixos/modules/tgsa.nix
+++ b/users/tazjin/nixos/modules/tgsa.nix
@@ -8,8 +8,13 @@
     serviceConfig = {
       DynamicUser = true;
       Restart = "always";
-      ExecStart = "${depot.users.tazjin.tgsa}/bin/tgsa";
+      LoadCredential = "tgsa-yandex.json:/run/agenix/tgsa-yandex";
     };
+
+    script = ''
+      export YANDEX_KEY_FILE="''${CREDENTIALS_DIRECTORY}/tgsa-yandex.json"
+      ${depot.users.tazjin.tgsa}/bin/tgsa
+    '';
   };
 
   services.nginx.virtualHosts."tgsa" = {