Added package options to all modules
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
@@ -20,6 +21,8 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkPackageOption pkgs "readarr" { };
|
||||
|
||||
stateDir = mkOption {
|
||||
type = types.path;
|
||||
default = "${nixarr.stateDir}/readarr";
|
||||
@@ -79,6 +82,7 @@ in {
|
||||
|
||||
services.readarr = {
|
||||
enable = cfg.enable;
|
||||
package = cfg.package;
|
||||
user = "readarr";
|
||||
group = "media";
|
||||
openFirewall = cfg.openFirewall;
|
||||
@@ -86,13 +90,13 @@ in {
|
||||
};
|
||||
|
||||
# Enable and specify VPN namespace to confine service in.
|
||||
systemd.services.readarr.vpnconfinement = mkIf cfg.vpn.enable {
|
||||
systemd.services.readarr.vpnConfinement = mkIf cfg.vpn.enable {
|
||||
enable = true;
|
||||
vpnnamespace = "wg";
|
||||
vpnNamespace = "wg";
|
||||
};
|
||||
|
||||
# Port mappings
|
||||
vpnnamespaces.wg = mkIf cfg.vpn.enable {
|
||||
vpnNamespaces.wg = mkIf cfg.vpn.enable {
|
||||
portMappings = [
|
||||
{
|
||||
from = defaultPort;
|
||||
|
||||
Reference in New Issue
Block a user