This commit is contained in:
mjallen18
2025-04-24 15:11:05 -05:00
parent ebf15f5582
commit a11bd8c149
10 changed files with 9 additions and 191 deletions

View File

@@ -8,37 +8,21 @@
./apps/jellyfin
./apps/jellyseerr
./apps/lubelogger
./apps/netbootxyz
./apps/nextcloud
./apps/ollama
./apps/paperless
./apps/paperless-ai
./apps/traefik
./apps/vert
./apps/wyoming
../../modules
./apps/netdata
];
nas-apps = {
free-games-claimer.enable = true;
manyfold.enable = true;
netbootxyz = {
enable = true;
port = "4000";
port2 = "4080";
};
paperless-ai.enable = false;
tdarr.enable = true;
# spotify cancelled, data still in db
your_spotify.enable = false;
mongodb.enable = false;
};
}

View File

@@ -46,6 +46,7 @@ in
PROTOCOL = "http";
ROOT_URL = rootUrl;
SSH_PORT = sshPort;
# SSH_LISTEN_PORT = sshPort;
};
service = {
REGISTER_EMAIL_CONFIRM = false;
@@ -96,9 +97,13 @@ in
sourcePort = httpPort;
}
{
destination = "${localAddress}:${toString sshPort}";
destination = "${localAddress}:${toString 22}";
sourcePort = sshPort;
}
# {
# destination = "${localAddress}:${toString 22}";
# sourcePort = 22;
# }
];
};
}

View File

@@ -1,41 +0,0 @@
{ config, pkgs, ... }:
{
services.netdata = {
enable = true;
# package = pkgs.netdataCloud;
package = pkgs.netdata.override {
withCloudUi = true;
};
configDir."python.d.conf" = pkgs.writeText "python.d.conf" ''
samba: yes
'';
# claimTokenFile = config.sops.secrets."jallen-nas/netdata-token".path;
config = {
# enable machine learning plugin
ml = {
"enabled" = "yes";
};
# enable samba plugin
plugins = {
"enable running new plugins" = "yes";
"ioping.plugin" = "yes";
"freeipmi.plugin" = "yes";
"perf.plugin" = "yes";
};
};
};
# add samba and sudo to path of python plugin
systemd.services.netdata.path = [ pkgs.samba "/run/wrappers" ];
# permit to run sudo smbstatus -P
security.sudo.extraConfig = ''
netdata ALL=(root) NOPASSWD: ${pkgs.samba}/bin/smbstatus
'';
# as documented here : https://github.com/netdata/netdata/blob/master/system/netdata.service.in
# review capabilityset above if other plugins are non functional
systemd.services.netdata.serviceConfig.CapabilityBoundingSet = ["CAP_SETGID"];
}

View File

@@ -1,32 +0,0 @@
{ lib, config, ... }:
with lib;
let
cfg = config.nas-apps.paperless-ai;
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"
"--network=bridge"
"--add-host=host.docker.internal:host-gateway"
];
volumes = [ "${cfg.configPath}:/app/data" ];
ports = [ "${cfg.port}:3000" ];
environment = {
NVIDIA_VISIBLE_DEVICES = "all";
NVIDIA_DRIVER_CAPABILITIES = "all";
PAPERLESS_API_URL = "http://10.0.1.20:28981";
PAPERLESS_API_TOKEN = "6f26e1a4632f23bc2da5b74c799ccbda18fa8022";
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
};
};
};
}

View File

@@ -1,47 +0,0 @@
{ lib, ... }:
with lib;
{
options.nas-apps.paperless-ai = {
enable = mkEnableOption "paperless-ai docker service";
autoStart = mkOption {
type = types.bool;
default = true;
};
port = mkOption {
type = types.str;
default = "3023";
};
name = mkOption {
type = types.str;
default = "paperless-ai";
};
image = mkOption {
type = types.str;
default = "clusterzx/paperless-ai";
};
configPath = mkOption {
type = types.str;
default = "/media/nas/ssd/nix-app-data/paperless-ai";
};
puid = mkOption {
type = types.str;
default = "911";
};
pgid = mkOption {
type = types.str;
default = "1000";
};
timeZone = mkOption {
type = types.str;
default = "America/Chicago";
};
};
}

View File

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

View File

@@ -6,7 +6,6 @@ let
9000 # authentik
2342 # grafana
51820 # wireguard
19999 # netdata
1025
1143
10200
@@ -16,6 +15,7 @@ let
4000 # netbootxyz
4080 # netbootxyz
3000 # gitea
2222 # gitea ssh
3300
9898
6754 # lubelogger

View File

@@ -101,9 +101,6 @@ in
"jallen-nas/open-webui" = {
restartUnits = [ "open-webui.service" ];
};
"jallen-nas/netdata-token" = {
restartUnits = [ "netdata.service" ];
};
"jallen-nas/paperless/secret" = {
restartUnits = [ "container@paperless.service" ];
};