This commit is contained in:
mjallen18
2024-07-26 11:04:46 -05:00
parent 1fc8f0217d
commit bf7671871e
12 changed files with 58 additions and 231 deletions

42
flake.lock generated
View File

@@ -11,11 +11,11 @@
"yafas": "yafas" "yafas": "yafas"
}, },
"locked": { "locked": {
"lastModified": 1721744192, "lastModified": 1721990846,
"narHash": "sha256-YKBxgcO5YkkLIxIuLXtrf0El1651hD09xc2iU1LENEc=", "narHash": "sha256-cMQSy13hl2fVPcGbsWnCIzM4gvplsmACiZXO9Ofnvt4=",
"owner": "chaotic-cx", "owner": "chaotic-cx",
"repo": "nyx", "repo": "nyx",
"rev": "cbed04d217033816e864b9cda08b20bbfe772ecf", "rev": "119af6552f17e95a57f41bc922e281d812d29cab",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -251,11 +251,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1721714663, "lastModified": 1721804110,
"narHash": "sha256-ZDW5+rlROxaOuoEfIQM7Gqhoa+WALEYdYIiZhyJjAu0=", "narHash": "sha256-i4jINRazBKPqlaS+qhlP+kV/UHEq3vs5itfpblqu4ZM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "7560dc942a6fbd37ebd1310b3dbda513de2d4b82", "rev": "af70fc502a15d7e1e4c5a4c4fc8e06c2ec561e0c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -292,11 +292,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1721714663, "lastModified": 1721996913,
"narHash": "sha256-ZDW5+rlROxaOuoEfIQM7Gqhoa+WALEYdYIiZhyJjAu0=", "narHash": "sha256-eqbhEBObarS6WsI0J1PVACQ8fXeq9OmSS0+iXBegoOI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "7560dc942a6fbd37ebd1310b3dbda513de2d4b82", "rev": "bc2b96acda50229bc99925dde5c8e561e90b0b00",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -495,11 +495,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1721413321, "lastModified": 1721911538,
"narHash": "sha256-0GdiQScDceUrVGbxYpV819LHesK3szHOhJ09e6sgES4=", "narHash": "sha256-5OrkPJsiZmNe99C6+KX0qx9sphoVLvldFjuqDYAZ8GQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "ab165a8a6cd12781d76fe9cbccb9e975d0fb634f", "rev": "d3c993c851ad40bbab7e08d566138ff72cd8744f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -511,11 +511,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1721562059, "lastModified": 1721924956,
"narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=", "narHash": "sha256-Sb1jlyRO+N8jBXEX9Pg9Z1Qb8Bw9QyOgLDNMEpmjZ2M=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe", "rev": "5ad6a14c6bf098e98800b091668718c336effc95",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -559,11 +559,11 @@
}, },
"nixpkgs-stable_3": { "nixpkgs-stable_3": {
"locked": { "locked": {
"lastModified": 1721548954, "lastModified": 1721949857,
"narHash": "sha256-7cCC8+Tdq1+3OPyc3+gVo9dzUNkNIQfwSDJ2HSi2u3o=", "narHash": "sha256-DID446r8KsmJhbCzx4el8d9SnPiE8qa6+eEQOJ40vR0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "63d37ccd2d178d54e7fb691d7ec76000740ea24a", "rev": "a1cc729dcbc31d9b0d11d86dc7436163548a9665",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -575,11 +575,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1721562059, "lastModified": 1721924956,
"narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=", "narHash": "sha256-Sb1jlyRO+N8jBXEX9Pg9Z1Qb8Bw9QyOgLDNMEpmjZ2M=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe", "rev": "5ad6a14c6bf098e98800b091668718c336effc95",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -8,14 +8,14 @@
}: }:
{ {
nas-apps = { nas-apps = {
beszel.enable = true;
beszel-agent.enable = true;
collabora.enable = true; collabora.enable = true;
deluge.enable = true; deluge.enable = true;
homarr.enable = true;
homepage.enable = false;
jackett.enable = true; jackett.enable = true;
jellyfin.enable = true; jellyfin.enable = true;
@@ -40,8 +40,6 @@
ollama.enable = true; ollama.enable = true;
onlyoffice.enable = false;
open-webui.enable = true; open-webui.enable = true;
orca-slicer.enable = true; orca-slicer.enable = true;

View File

@@ -6,7 +6,7 @@
}: }:
with lib; with lib;
let let
cfg = config.nas-apps.puter; cfg = config.nas-apps.beszel-agent;
in in
{ {
imports = [ ./options.nix ]; imports = [ ./options.nix ];
@@ -15,12 +15,14 @@ in
virtualisation.oci-containers.containers."${cfg.name}" = { virtualisation.oci-containers.containers."${cfg.name}" = {
autoStart = cfg.autoStart; autoStart = cfg.autoStart;
image = cfg.image; image = cfg.image;
ports = [ "${cfg.httpPort}:4100" ]; ports = [ "${cfg.port}:45876" ];
volumes = [ volumes = [
"${cfg.configPath}:/etc/puter" "${cfg.podmanSock}:/var/run/docker.sock:ro"
"${cfg.dataPath}:/var/puter"
]; ];
environment = { environment = {
PORT = cfg.port;
KEY = cfg.key;
FILESYSTEM = cfg.fileSystem;
PUID = cfg.puid; PUID = cfg.puid;
PGID = cfg.pgid; PGID = cfg.pgid;
TZ = cfg.timeZone; TZ = cfg.timeZone;

View File

@@ -1,37 +1,42 @@
{ lib, ... }: { lib, ... }:
with lib; with lib;
{ {
options.nas-apps.puter = { options.nas-apps.beszel-agent = {
enable = mkEnableOption "puter docker service"; enable = mkEnableOption "beszel agent docker service";
autoStart = mkOption { autoStart = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
}; };
httpPort = mkOption { port = mkOption {
type = types.str; type = types.str;
default = "4100"; default = "45876";
}; };
name = mkOption { name = mkOption {
type = types.str; type = types.str;
default = "puter"; default = "beszel-agent";
}; };
image = mkOption { image = mkOption {
type = types.str; type = types.str;
default = "ghcr.io/heyputer/puter"; default = "henrygd/beszel-agent";
}; };
configPath = mkOption { podmanSock = mkOption {
type = types.str; type = types.str;
default = "/media/nas/ssd/ssd_app_data/puter/config"; default = "/var/run/podman/podman.sock";
}; };
dataPath = mkOption { key = mkOption {
type = types.str; type = types.str;
default = "/media/nas/ssd/ssd_app_data/puter/data"; default = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBIxbgq3dHkhhmmydqgT1DQCAEEUdZ2V0RjzmxtyJo9w";
};
fileSystem = mkOption {
type = types.str;
default = "/dev/mapper/hdd1";
}; };
puid = mkOption { puid = mkOption {
@@ -49,4 +54,4 @@ with lib;
default = "America/Chicago"; default = "America/Chicago";
}; };
}; };
} }

View File

@@ -6,7 +6,7 @@
}: }:
with lib; with lib;
let let
cfg = config.nas-apps.onlyoffice; cfg = config.nas-apps.beszel;
in in
{ {
imports = [ ./options.nix ]; imports = [ ./options.nix ];
@@ -15,15 +15,14 @@ in
virtualisation.oci-containers.containers."${cfg.name}" = { virtualisation.oci-containers.containers."${cfg.name}" = {
autoStart = cfg.autoStart; autoStart = cfg.autoStart;
image = cfg.image; image = cfg.image;
ports = [ "${cfg.port}:80" ]; ports = [ "${cfg.httpPort}:8090" ];
volumes = [ volumes = [
# ... "${cfg.configPath}:/beszel_data"
]; ];
environment = { environment = {
PUID = cfg.puid; PUID = cfg.puid;
PGID = cfg.pgid; PGID = cfg.pgid;
TZ = cfg.timeZone; TZ = cfg.timeZone;
JWT_SECRET = cfg.jwtSecret;
}; };
}; };
}; };

View File

@@ -1,8 +1,8 @@
{ lib, ... }: { lib, ... }:
with lib; with lib;
{ {
options.nas-apps.homarr = { options.nas-apps.beszel = {
enable = mkEnableOption "homarr docker service"; enable = mkEnableOption "beszel docker service";
autoStart = mkOption { autoStart = mkOption {
type = types.bool; type = types.bool;
@@ -11,22 +11,22 @@ with lib;
httpPort = mkOption { httpPort = mkOption {
type = types.str; type = types.str;
default = "7575"; default = "8090";
}; };
name = mkOption { name = mkOption {
type = types.str; type = types.str;
default = "homarr"; default = "beszel";
}; };
image = mkOption { image = mkOption {
type = types.str; type = types.str;
default = "ghcr.io/ajnart/homarr"; default = "henrygd/beszel";
}; };
configPath = mkOption { configPath = mkOption {
type = types.str; type = types.str;
default = "/media/nas/ssd/ssd_app_data/homarr"; default = "/media/nas/ssd/nix-app-data/beszel";
}; };
puid = mkOption { puid = mkOption {

View File

@@ -1,17 +0,0 @@
# { config, pkgs, ... }:
# {
# # dashy
# virtualisation.oci-containers.containers."dashy" = {
# autoStart = true;
# image = " lissy93/dashy:latest";
# ports = [ "8888:80" ];
# volumes = [
# "/media/nas/ssd/nix-app-data/dashy/conf.yaml:/app/public/conf.yaml"
# ];
# environment = {
# PUID = "911";
# PGID = "1000";
# TZ = "America/Chicago";
# };
# };
# }

View File

@@ -1,33 +0,0 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.nas-apps.homarr;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
virtualisation.oci-containers.containers."${cfg.name}" = {
autoStart = cfg.autoStart;
image = cfg.image;
ports = [ "${cfg.httpPort}:7575" ];
volumes = [
"${cfg.configPath}/configs:/app/data/configs"
"${cfg.configPath}/icons:/app/public/icons"
"${cfg.configPath}/data:/data"
"/var/run/docker.sock:/var/run/docker.sock"
"/var/run/podman/podman.sock:/var/run/podman.sock"
];
environment = {
# PUID = cfg.puid;
# PGID = cfg.pgid;
TZ = cfg.timeZone;
};
};
};
}

View File

@@ -1,31 +0,0 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.nas-apps.homepage;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
virtualisation.oci-containers.containers."${cfg.name}" = {
autoStart = cfg.autoStart;
image = cfg.image;
ports = [ "${cfg.httpPort}:3000" ];
volumes = [
"${cfg.configPath}:/app/config"
"/var/run/docker.sock:/var/run/docker.sock"
"/var/run/podman/podman.sock:/var/run/podman.sock"
];
environment = {
# PUID = cfg.puid;
# PGID = cfg.pgid;
TZ = cfg.timeZone;
};
};
};
}

View File

@@ -1,47 +0,0 @@
{ lib, ... }:
with lib;
{
options.nas-apps.homepage = {
enable = mkEnableOption "homepage docker service";
autoStart = mkOption {
type = types.bool;
default = true;
};
httpPort = mkOption {
type = types.str;
default = "3030";
};
name = mkOption {
type = types.str;
default = "homepage";
};
image = mkOption {
type = types.str;
default = " ghcr.io/gethomepage/homepage";
};
configPath = mkOption {
type = types.str;
default = "/media/nas/ssd/ssd_app_data/homepage";
};
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,47 +0,0 @@
{ lib, ... }:
with lib;
{
options.nas-apps.onlyoffice = {
enable = mkEnableOption "onlyoffice docker service";
autoStart = mkOption {
type = types.bool;
default = true;
};
port = mkOption {
type = types.str;
default = "9980";
};
name = mkOption {
type = types.str;
default = "onlyoffice";
};
image = mkOption {
type = types.str;
default = "onlyoffice/documentserver";
};
puid = mkOption {
type = types.str;
default = "911";
};
pgid = mkOption {
type = types.str;
default = "1000";
};
timeZone = mkOption {
type = types.str;
default = "America/Chicago";
};
jwtSecret = mkOption {
type = types.str;
default = "BogieDudie1";
};
};
}

View File

@@ -2,11 +2,11 @@
{ {
imports = [ imports = [
./samba ./samba
./apps/beszel
./apps/beszel-agent
./apps/collabora ./apps/collabora
./apps/deluge ./apps/deluge
./apps/discover-wrapped ./apps/discover-wrapped
./apps/homarr
./apps/homepage
./apps/jackett ./apps/jackett
./apps/jellyfin ./apps/jellyfin
./apps/jellyseerr ./apps/jellyseerr
@@ -14,10 +14,8 @@
./apps/mealie ./apps/mealie
./apps/nextcloud ./apps/nextcloud
./apps/ollama ./apps/ollama
./apps/onlyoffice
./apps/open-webui ./apps/open-webui
./apps/orca-slicer ./apps/orca-slicer
./apps/puter
./apps/radarr ./apps/radarr
./apps/redis ./apps/redis
./apps/sabnzbd ./apps/sabnzbd