Compare commits

..

2 Commits

4 changed files with 70 additions and 0 deletions

View File

@ -38,7 +38,9 @@
trusted-users = ["root" "phundrak"];
};
services = {
calibre.enable = true;
endlessh.enable = true;
jellyfin.enable = true;
plex = {
enable = true;
dataDir = "/tank/web/stacks/plex/plex-config";

View File

@ -0,0 +1,38 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.system.services.calibre;
in {
options.system.services.calibre = {
enable = mkEnableOption "Enable Calibre Web";
user = mkOption {
type = types.string;
default = "phundrak";
};
group = mkOption {
type = types.string;
default = "users";
};
dataDir = mkOption {
type = types.string;
example = "/tank/calibre/conf";
default = "/tank/calibre/conf";
};
library = mkOption {
type = types.string;
example = "/tank/calibre/library";
default = "/tank/calibre/library";
};
};
config.services.calibre-web = mkIf cfg.enable {
inherit (cfg) enable user group dataDir;
options = {
calibreLibrary = cfg.library;
enableBookConversion = true;
enableBookUploading = true;
};
};
}

View File

@ -1,7 +1,9 @@
{
imports = [
./calibre.nix
./endlessh.nix
./fwupd.nix
./jellyfin.nix
./plex.nix
./printing.nix
./ssh.nix

View File

@ -0,0 +1,28 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.system.services.jellyfin;
in {
options.system.services.jellyfin = {
enable = mkEnableOption "Enable Jellyfin";
dataDir = mkOption {
type = types.string;
default = "/tank/jellyfin/data";
example = "/tank/jellyfin/data";
};
user = mkOption {
type = types.string;
default = "phundrak";
};
group = mkOption {
type = types.string;
default = "users";
};
};
config.services.jellyfin = mkIf cfg.enable {
inherit (cfg) enable group user dataDir;
};
}