NixOS deployment for LinuxLab
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
441 B

2 weeks ago
  1. { config, ... }:
  2. {
  3. services.nix-serve = {
  4. enable = true;
  5. secretKeyFile = config.sops.secrets."cache/key".path;
  6. };
  7. services.nginx = {
  8. enable = true;
  9. virtualHosts."cache.${config.networking.domain}" = {
  10. locations."/".proxyPass = with config.services.nix-serve;
  11. "http://${bindAddress}:${port}";
  12. };
  13. };
  14. sops.secrets."cache/key" = {
  15. sopsFile = ./secrets/cache.key;
  16. format = "binary";
  17. };
  18. }