Something went wrong. Try again.
My Nix Configuration
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637{ self, pkgs, ... }:let inherit (pkgs.stdenv.hostPlatform) system;in{ /** Creates an Anubis instance for this service
# Example ```nix mkAnubisInstance "service-a" false ```
# Type ``` mkAnubisInstance :: String -> Bool -> AttrSet ```
# Arguments - [service] The service name that this instance will be proxying - [customPolicy] Whether the service uses a custom `${service}.yaml` policy file. If false, uses `default.yaml` */ mkAnubisInstance = service: customPolicy: let serviceData = self.data.services.${service}; policyFile = if customPolicy then "${service}.yaml" else "default.yaml"; in { settings = { BIND = ":${toString serviceData.anubis}"; POLICY_FNAME = "${self.packages.${system}.anubis-files}/policies/${policyFile}"; TARGET = "http://localhost:${toString serviceData.port}"; }; };}