MyNixOS website logo
option

services.gophernicus.filters

Executables that should be registered as preprocessing filters.

Declarations
Type
attribute set of path in the Nix store
Default
{ }
Example
{
  # Files with the `.txt` extension should be preprocessed with `my-filter`
  txt = pkgs.writeShellScript "my-filter" ''
    echo "To whom it may concern..."
    # First argument is the path of the file being filtered
    cat "$1"
    echo "Best regards, server owner"
  '';
  # Files with the `.php` extension should automatically be rendered by php
  php = "${pkgs.php}/bin/php";
}