NixOS configuration for HPC cluster https://docs.hpc.informatik.hs-fulda.de/
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.

27 lines
619 B

1 year ago
1 year ago
1 year ago
1 year ago
  1. { config, ... }:
  2. {
  3. services.nix-serve = {
  4. enable = true;
  5. secretKeyFile = config.sops.secrets."cache/privateKey".path;
  6. };
  7. sops.secrets."cache/privateKey" = {
  8. format = "binary";
  9. sopsFile = ../../secrets/cache-priv-key.pem;
  10. };
  11. services.nginx = {
  12. enable = true;
  13. recommendedProxySettings = true;
  14. virtualHosts = {
  15. "cache.${config.networking.domain}" = {
  16. locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
  17. };
  18. };
  19. };
  20. hpc.hostFile.aliases = [
  21. "cache.${config.networking.domain}"
  22. ];
  23. }