Latest changes

This commit is contained in:
ari committed 2024-10-01 15:02:36 -04:00
1 parent 63d8298e17
commit 6195a9e93f
12 files changed
+201 -116

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
{ config, lib, ... }:
let
cfg = config.skyg.server.db;
dbPort = 5432;
in
{
options = {
skyg.server.db = {
enable = lib.mkEnableOption
"Enable DB Store";
openFirewall = lib.mkEnableOption
"Open Firewall ports for db port";lib.mkIf cfg.openFirewall
};
};
config = lib.mkIf cfg.enable {
networking.firewall.allowedUDPPorts = lib.mkIf cfg.openFirewall [ dbPort ];
networking.firewall.allowedTCPPorts = lib.mkIf cfg.openFirewall [ dbPort ];
services.postgresql = {
enable = true;
settings.port = dbPort;
dataDir = "";
};
};
}
+23 -3
View File
@@ -1,17 +1,34 @@
{ config, lib, ... }:
{ config, pkgs, lib, ... }:
let
cfg = config.services.prowlarr;
cfg = config.skg.nixos.server.services.prowlarr;
in
{
options = {
services.prowlarr = {
skg.nixos.server.services.prowlarr = {
enable = lib.mkEnableOption "Prowlarr, an indexer manager/proxy for Torrent trackers and Usenet indexers";
package = lib.mkPackageOption pkgs "prowlarr" { };
openFirewall = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Open ports in the firewall for the Prowlarr web interface.";
};
dataDir = lib.mkOption {
type = lib.types.str;
default = "/var/lib/prowlarr";
description = "data directory for prowlarr";
};
user = lib.mkOption {
type = lib.types.str;
default = "prowlarr";
};
group = lib.mkOption {
type = lib.types.str;
default = "prowlarr";
};
port = lib.mkOption {
type = lib.types.int;
default = 9096;
@@ -27,6 +44,9 @@ in
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = cfg.user;
Group = cfg.group;
WorkingDirectory = cfg.dataDir;
Type = "simple";
DynamicUser = true;
StateDirectory = "prowlarr";