move
This commit is contained in:
28
modules/nixos/services/free-games-claimer/default.nix
Executable file
28
modules/nixos/services/free-games-claimer/default.nix
Executable file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.${namespace}.services.free-games-claimer;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation.oci-containers.containers."${cfg.name}" = {
|
||||
autoStart = cfg.autoStart;
|
||||
image = cfg.image;
|
||||
ports = [ "${cfg.httpPort}:6080" ];
|
||||
volumes = [ "${cfg.dataPath}:/fgc/data" ];
|
||||
environmentFiles = [ config.sops.templates."fgc.env".path ];
|
||||
environment = {
|
||||
PUID = cfg.puid;
|
||||
PGID = cfg.pgid;
|
||||
TZ = cfg.timeZone;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
47
modules/nixos/services/free-games-claimer/options.nix
Executable file
47
modules/nixos/services/free-games-claimer/options.nix
Executable file
@@ -0,0 +1,47 @@
|
||||
{ lib, namespace, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.${namespace}.services.free-games-claimer = {
|
||||
enable = mkEnableOption "free-games-claimer docker service";
|
||||
|
||||
autoStart = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
|
||||
httpPort = mkOption {
|
||||
type = types.str;
|
||||
default = "6080";
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "free-games-claimer";
|
||||
};
|
||||
|
||||
image = mkOption {
|
||||
type = types.str;
|
||||
default = "ghcr.io/vogler/free-games-claimer";
|
||||
};
|
||||
|
||||
dataPath = mkOption {
|
||||
type = types.str;
|
||||
default = "/media/nas/main/nix-app-data/free-games-claimer";
|
||||
};
|
||||
|
||||
puid = mkOption {
|
||||
type = types.str;
|
||||
default = "911";
|
||||
};
|
||||
|
||||
pgid = mkOption {
|
||||
type = types.str;
|
||||
default = "1000";
|
||||
};
|
||||
|
||||
timeZone = mkOption {
|
||||
type = types.str;
|
||||
default = "America/Chicago";
|
||||
};
|
||||
};
|
||||
}
|
||||
39
modules/nixos/services/manyfold/default.nix
Executable file
39
modules/nixos/services/manyfold/default.nix
Executable file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.${namespace}.services.manyfold;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation.oci-containers.containers."${cfg.name}" = {
|
||||
autoStart = cfg.autoStart;
|
||||
image = cfg.image;
|
||||
ports = [ "${cfg.httpPort}:3214" ];
|
||||
extraOptions = [
|
||||
"--cap-drop=ALL"
|
||||
"--cap-add=CHOWN"
|
||||
"--cap-add=DAC_OVERRIDE"
|
||||
"--cap-add=SETUID"
|
||||
"--cap-add=SETGID"
|
||||
"--security-opt=no-new-privileges:true"
|
||||
];
|
||||
volumes = [
|
||||
"${cfg.configPath}:/config"
|
||||
"${cfg.dataPath}:/libraries"
|
||||
];
|
||||
environment = {
|
||||
PUID = cfg.puid;
|
||||
PGID = cfg.pgid;
|
||||
TZ = cfg.timeZone;
|
||||
};
|
||||
environmentFiles = [ config.sops.secrets."jallen-nas/manyfold/secretkeybase".path ];
|
||||
};
|
||||
};
|
||||
}
|
||||
52
modules/nixos/services/manyfold/options.nix
Executable file
52
modules/nixos/services/manyfold/options.nix
Executable file
@@ -0,0 +1,52 @@
|
||||
{ lib, namespace, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.${namespace}.services.manyfold = {
|
||||
enable = mkEnableOption "manyfold docker service";
|
||||
|
||||
autoStart = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
|
||||
httpPort = mkOption {
|
||||
type = types.str;
|
||||
default = "3214";
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "manyfold";
|
||||
};
|
||||
|
||||
image = mkOption {
|
||||
type = types.str;
|
||||
default = "ghcr.io/manyfold3d/manyfold-solo";
|
||||
};
|
||||
|
||||
configPath = mkOption {
|
||||
type = types.str;
|
||||
default = "/media/nas/main/nix-app-data/manyfold";
|
||||
};
|
||||
|
||||
dataPath = mkOption {
|
||||
type = types.str;
|
||||
default = "/media/nas/main/3d_printer";
|
||||
};
|
||||
|
||||
puid = mkOption {
|
||||
type = types.str;
|
||||
default = "911";
|
||||
};
|
||||
|
||||
pgid = mkOption {
|
||||
type = types.str;
|
||||
default = "1000";
|
||||
};
|
||||
|
||||
timeZone = mkOption {
|
||||
type = types.str;
|
||||
default = "America/Chicago";
|
||||
};
|
||||
};
|
||||
}
|
||||
31
modules/nixos/services/mongodb/default.nix
Executable file
31
modules/nixos/services/mongodb/default.nix
Executable file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.${namespace}.services.mongodb;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation.oci-containers.containers."${cfg.name}" = {
|
||||
autoStart = cfg.autoStart;
|
||||
image = cfg.image;
|
||||
ports = [ "${cfg.port}:27017" ];
|
||||
volumes = [ "${cfg.configPath}:/data/db" ];
|
||||
extraOptions = [ "--network-alias=mongo" ];
|
||||
# environmentFiles = cfg.environmentFiles;
|
||||
environment = {
|
||||
PUID = cfg.puid;
|
||||
PGID = cfg.pgid;
|
||||
TZ = cfg.timeZone;
|
||||
# MONGO_INITDB_ROOT_USERNAME = "";#cfg.databaseUser;
|
||||
# MONGO_INITDB_ROOT_PASSWORD = "";#cfg.databasePassword; # get from env file
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
52
modules/nixos/services/mongodb/options.nix
Executable file
52
modules/nixos/services/mongodb/options.nix
Executable file
@@ -0,0 +1,52 @@
|
||||
{ lib, namespace, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.${namespace}.services.mongodb = {
|
||||
enable = mkEnableOption "mongodb docker service";
|
||||
|
||||
autoStart = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.str;
|
||||
default = "27017";
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "mongo";
|
||||
};
|
||||
|
||||
image = mkOption {
|
||||
type = types.str;
|
||||
default = "mongo";
|
||||
};
|
||||
|
||||
configPath = mkOption {
|
||||
type = types.str;
|
||||
default = "/media/nas/main/mongodb";
|
||||
};
|
||||
|
||||
puid = mkOption {
|
||||
type = types.str;
|
||||
default = "911";
|
||||
};
|
||||
|
||||
pgid = mkOption {
|
||||
type = types.str;
|
||||
default = "1000";
|
||||
};
|
||||
|
||||
timeZone = mkOption {
|
||||
type = types.str;
|
||||
default = "America/Chicago";
|
||||
};
|
||||
|
||||
environmentFiles = mkOption {
|
||||
type = with types; listOf path;
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
}
|
||||
47
modules/nixos/services/tdarr/default.nix
Executable file
47
modules/nixos/services/tdarr/default.nix
Executable file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.${namespace}.services.tdarr;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
virtualisation.oci-containers.containers.${cfg.name} = {
|
||||
autoStart = true;
|
||||
image = cfg.image;
|
||||
extraOptions = [ "--device=nvidia.com/gpu=0" ];
|
||||
volumes = [
|
||||
"${cfg.configPath}:/app/configs"
|
||||
"${cfg.serverPath}:/app/server"
|
||||
"${cfg.logPath}:/app/logs"
|
||||
"${cfg.transcodePath}:/temp"
|
||||
"${cfg.moviesPath}:/data/movies"
|
||||
"${cfg.tvPath}:/data/tv"
|
||||
];
|
||||
ports = [
|
||||
"${cfg.serverPort}:8266"
|
||||
"${cfg.webUIPort}:8265"
|
||||
];
|
||||
environment = {
|
||||
serverPort = "8266";
|
||||
webUIPort = "8265";
|
||||
internalNode = "true";
|
||||
inContainer = "true";
|
||||
ffmpegVersion = "6";
|
||||
nodeName = "tdarr node";
|
||||
NVIDIA_VISIBLE_DEVICES = "all";
|
||||
NVIDIA_DRIVER_CAPABILITIES = "all";
|
||||
PUID = cfg.puid;
|
||||
PGID = cfg.pgid;
|
||||
TZ = cfg.timeZone;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
77
modules/nixos/services/tdarr/options.nix
Executable file
77
modules/nixos/services/tdarr/options.nix
Executable file
@@ -0,0 +1,77 @@
|
||||
{ lib, namespace, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.${namespace}.services.tdarr = {
|
||||
enable = mkEnableOption "tdarr docker service";
|
||||
|
||||
autoStart = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
|
||||
serverPort = mkOption {
|
||||
type = types.str;
|
||||
default = "8266";
|
||||
};
|
||||
|
||||
webUIPort = mkOption {
|
||||
type = types.str;
|
||||
default = "8265";
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "tdarr";
|
||||
};
|
||||
|
||||
image = mkOption {
|
||||
type = types.str;
|
||||
default = "ghcr.io/haveagitgat/tdarr";
|
||||
};
|
||||
|
||||
configPath = mkOption {
|
||||
type = types.str;
|
||||
default = "/media/nas/main/nix-app-data/tdarr/config";
|
||||
};
|
||||
|
||||
serverPath = mkOption {
|
||||
type = types.str;
|
||||
default = "/media/nas/main/nix-app-data/tdarr/server";
|
||||
};
|
||||
|
||||
logPath = mkOption {
|
||||
type = types.str;
|
||||
default = "/media/nas/main/nix-app-data/tdarr/logs";
|
||||
};
|
||||
|
||||
transcodePath = mkOption {
|
||||
type = types.str;
|
||||
default = "/media/nas/main/nix-app-data/tdarr/transcode";
|
||||
};
|
||||
|
||||
moviesPath = mkOption {
|
||||
type = types.str;
|
||||
default = "/media/nas/main/movies";
|
||||
};
|
||||
|
||||
tvPath = mkOption {
|
||||
type = types.str;
|
||||
default = "/media/nas/main/tv";
|
||||
};
|
||||
|
||||
puid = mkOption {
|
||||
type = types.str;
|
||||
default = "911";
|
||||
};
|
||||
|
||||
pgid = mkOption {
|
||||
type = types.str;
|
||||
default = "1000";
|
||||
};
|
||||
|
||||
timeZone = mkOption {
|
||||
type = types.str;
|
||||
default = "America/Chicago";
|
||||
};
|
||||
};
|
||||
}
|
||||
46
modules/nixos/services/your-spotify/default.nix
Executable file
46
modules/nixos/services/your-spotify/default.nix
Executable file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.${namespace}.services.your_spotify;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
virtualisation.oci-containers.containers."${cfg.name}-server" = {
|
||||
autoStart = true;
|
||||
image = cfg.imageServer;
|
||||
volumes = [ "${cfg.configPath}:/root/.your-spotify" ];
|
||||
ports = [ "${cfg.portServer}:8080" ];
|
||||
dependsOn = [ "mongo" ];
|
||||
environment = {
|
||||
PUID = cfg.puid;
|
||||
PGID = cfg.pgid;
|
||||
TZ = cfg.timeZone;
|
||||
API_ENDPOINT = "https://your-spotify-server.mjallen.dev";
|
||||
CLIENT_ENDPOINT = "https://your-spotify.mjallen.dev";
|
||||
SPOTIFY_PUBLIC = "e270589d72a6494680a17d325af8670d";
|
||||
SPOTIFY_SECRET = "423cb7b69fe8486e89eccd01e0c22924";
|
||||
MONGO_ENDPOINT = "mongodb://10.0.1.3:27017";
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers."${cfg.name}-web" = {
|
||||
autoStart = true;
|
||||
image = cfg.imageWeb;
|
||||
ports = [ "${cfg.portWeb}:3000" ];
|
||||
environment = {
|
||||
PUID = cfg.puid;
|
||||
PGID = cfg.pgid;
|
||||
TZ = cfg.timeZone;
|
||||
API_ENDPOINT = "https://your-spotify-server.mjallen.dev";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
57
modules/nixos/services/your-spotify/options.nix
Executable file
57
modules/nixos/services/your-spotify/options.nix
Executable file
@@ -0,0 +1,57 @@
|
||||
{ lib, namespace, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.${namespace}.services.your_spotify = {
|
||||
enable = mkEnableOption "your_spotify docker service";
|
||||
|
||||
autoStart = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
|
||||
portServer = mkOption {
|
||||
type = types.str;
|
||||
default = "7777";
|
||||
};
|
||||
|
||||
portWeb = mkOption {
|
||||
type = types.str;
|
||||
default = "7778";
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "your_spotify";
|
||||
};
|
||||
|
||||
imageServer = mkOption {
|
||||
type = types.str;
|
||||
default = "yooooomi/your_spotify_server";
|
||||
};
|
||||
|
||||
imageWeb = mkOption {
|
||||
type = types.str;
|
||||
default = "yooooomi/your_spotify_client";
|
||||
};
|
||||
|
||||
configPath = mkOption {
|
||||
type = types.str;
|
||||
default = "/media/nas/main/nix-app-data/your_spotify";
|
||||
};
|
||||
|
||||
puid = mkOption {
|
||||
type = types.str;
|
||||
default = "911";
|
||||
};
|
||||
|
||||
pgid = mkOption {
|
||||
type = types.str;
|
||||
default = "1000";
|
||||
};
|
||||
|
||||
timeZone = mkOption {
|
||||
type = types.str;
|
||||
default = "America/Chicago";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user