This commit is contained in:
mjallen18
2025-04-15 21:19:12 -05:00
parent da782ab76d
commit 3ebbbb7f90
7 changed files with 11 additions and 8 deletions

View File

@@ -5,6 +5,7 @@
# ./apps/crowdsec
./apps/jellyfin
./apps/jellyseerr
./apps/netbootxyz
./apps/nextcloud
./apps/ollama
./apps/paperless
@@ -22,8 +23,7 @@
free-games-claimer.enable = true;
manyfold.enable = true;
netbootxyz = {
enable = true;
port = "4000";

View File

@@ -0,0 +1,25 @@
{ lib, config, ... }:
with lib;
let
cfg = config.nas-apps.netbootxyz;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
virtualisation.oci-containers.containers.${cfg.name} = {
autoStart = true;
image = cfg.image;
volumes = [ "${cfg.configPath}:/config" "${cfg.assetsPath}:/assets" ];
ports = [ "${cfg.port}:3000" "69:69" "${cfg.port2}:80" ];
environment = {
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
WEB_APP_PORT = cfg.port;
NGINX_PORT = cfg.port2;
};
};
};
}

View File

@@ -0,0 +1,58 @@
{ lib, ... }:
with lib;
{
options.nas-apps.netbootxyz = {
enable = mkEnableOption "netbootxyz docker service";
autoStart = mkOption {
type = types.bool;
default = true;
};
port = mkOption {
type = types.str;
default = "3000";
};
port2 = mkOption {
type = types.str;
default = "8080";
};
name = mkOption {
type = types.str;
default = "netbootxyz";
};
image = mkOption {
type = types.str;
default = "ghcr.io/netbootxyz/netbootxyz";
};
configPath = mkOption {
type = types.str;
default = "/media/nas/ssd/nix-app-data/netbootxyz";
};
assetsPath = mkOption {
type = types.str;
default = "/media/nas/main/isos";
};
puid = mkOption {
type = types.str;
default = "911";
};
pgid = mkOption {
type = types.str;
default = "1000";
};
timeZone = mkOption {
type = types.str;
default = "America/Chicago";
};
};
}

View File

@@ -2,11 +2,11 @@
{
virtualisation.oci-containers.containers.vert = {
autoStart = true;
image = "vert-sh/vert";
image = "ghcr.io/vert-sh/vert";
ports = [ "9876:80" ];
environment = {
PUID = config.users.users.nix-apps.uid;
PGID = config.users.groups.jallen-nas.gid;
PUID = toString config.users.users.nix-apps.uid;
PGID = toString config.users.groups.jallen-nas.gid;
TZ = "America/Chicago";
};
};

View File

@@ -13,6 +13,8 @@ let
10300
8127
9980 # onlyoffice
4000 # netbootxyz
4080 # netbootxyz
];
in
{