nix-config/modules/services/sabnzbd.nix
Bruno BELANYI 4ccf549e58 modules: system: remove 'media'
It was not the idiomatic way to do this.
2021-09-15 16:10:06 +02:00

29 lines
535 B
Nix

# Usenet binary client.
{ config, lib, ... }:
let
cfg = config.my.services.sabnzbd;
port = 9090; # NOTE: not declaratively set...
in
{
options.my.services.sabnzbd = with lib; {
enable = mkEnableOption "SABnzbd binary news reader";
};
config = lib.mkIf cfg.enable {
services.sabnzbd = {
enable = true;
group = "media";
};
# Set-up media group
users.groups.media = { };
my.services.nginx.virtualHosts = [
{
subdomain = "sabnzbd";
inherit port;
}
];
};
}