config/modules/nixos/sites/invidious/default.nix

26 lines
443 B
Nix
Raw Normal View History

2024-09-21 18:49:15 -04:00
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.sites.invidious;
in {
options.sites.invidious = with types; {
enable = mkBoolOpt false "Enable invidious instance";
domain = mkStringOpt "vid.zoeys.computer" "The domain of the invidious instance";
};
config = mkIf cfg.enable {
services.invidious = {
enable = true;
domain = cfg.domain;
nginx.enable = true;
};
};
}