Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/signalwalker/nix.pkg.comentario
A Nix flake packaging Comentario, an open-source comment engine.
https://github.com/signalwalker/nix.pkg.comentario
comentario nix nixos
Last synced: 12 days ago
JSON representation
A Nix flake packaging Comentario, an open-source comment engine.
- Host: GitHub
- URL: https://github.com/signalwalker/nix.pkg.comentario
- Owner: SignalWalker
- Created: 2024-10-14T14:46:45.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-10-17T16:15:28.000Z (2 months ago)
- Last Synced: 2024-12-14T16:11:57.865Z (12 days ago)
- Topics: comentario, nix, nixos
- Language: Nix
- Homepage: https://comentario.app/
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nix Flake for Comentario
A [Nix](https://nixos.org/) flake packaging [Comentario](https://comentario.app/), an open-source comment engine.
## Usage
Import the nixpkgs overlay and NixOS module:
```nix
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
comentario = {
url = "github:SignalWalker/nix.pkg.comentario";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ {
self,
nixpkgs,
comentario,
...
}: {
nixosConfigurations."example" = nixpkgs.lib.nixosSystem {
modules = [
comentario.nixosModules.default
({config, pkgs, lib, ...}: {
config = {
nixpkgs.overlays = [
comentario.overlays.default
];
};
})
];
};
};
```Configure the service:
```nix
{ config, pkgs, lib, ...}: let
com = config.services.comentario;
in {
config = {
services.comentario = {
enable = true;
# These are the environment variables defined in the Comentario docs: https://docs.comentario.app/en/configuration/backend/static/
settings = {
HOST = "localhost";
PORT = 8080;
BASE_URL = "https://${com.virtualHost.domain}";
# The service will fail if the secrets file doesn't exist or isn't accessible at runtime.
# Make sure to make it readable by the comentario user/group (`config.services.comentario.user`).
SECRETS_FILE = "/etc/comentario/secrets.yaml";
};
virtualHost = {
domain = "comments.website.example";
# This enables a simple NGINX vhost.
nginx.enable = true;
};
};
services.nginx = {
enable = true;
virtualHosts.${com.virtualHost.domain} = {
# SSL is optional
enableACME = true;
forceSSL = true;
};
};
};
};
```