diff options
Diffstat (limited to 'users/tazjin/nixos/modules/tgsa.nix')
-rw-r--r-- | users/tazjin/nixos/modules/tgsa.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/users/tazjin/nixos/modules/tgsa.nix b/users/tazjin/nixos/modules/tgsa.nix index 9953ab03acae..e162e0d8228f 100644 --- a/users/tazjin/nixos/modules/tgsa.nix +++ b/users/tazjin/nixos/modules/tgsa.nix @@ -6,11 +6,15 @@ wantedBy = [ "multi-user.target" ]; serviceConfig = { - EnvironmentFile = "/root/tgsa-env"; # TODO(tazjin): automate this 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" = { |