modules: services: put modules into folders
This commit is contained in:
parent
836b54b8eb
commit
ac90c5b11a
29 changed files with 28 additions and 28 deletions
28
modules/services/sabnzbd/default.nix
Normal file
28
modules/services/sabnzbd/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# 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;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue