puter
This commit is contained in:
@@ -79,6 +79,8 @@ in
|
|||||||
|
|
||||||
orca-slicer.enable = true;
|
orca-slicer.enable = true;
|
||||||
|
|
||||||
|
puter.enable = true;
|
||||||
|
|
||||||
vscode.enable = true;
|
vscode.enable = true;
|
||||||
|
|
||||||
swag.enable = true;
|
swag.enable = true;
|
||||||
|
|||||||
30
modules/apps/puter/default.nix
Normal file
30
modules/apps/puter/default.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.nas-apps.puter;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ ./options.nix ];
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
virtualisation.oci-containers.containers."${cfg.name}" = {
|
||||||
|
autoStart = cfg.autoStart;
|
||||||
|
image = cfg.image;
|
||||||
|
ports = [ "${cfg.httpPort}:4100" ];
|
||||||
|
volumes = [
|
||||||
|
"${cfg.configPath}:/etc/puter"
|
||||||
|
"${cfg.dataPath}:/var/puter"
|
||||||
|
];
|
||||||
|
environment = {
|
||||||
|
PUID = cfg.puid;
|
||||||
|
PGID = cfg.pgid;
|
||||||
|
TZ = cfg.timeZone;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
52
modules/apps/puter/options.nix
Normal file
52
modules/apps/puter/options.nix
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
options.nas-apps.puter = {
|
||||||
|
enable = mkEnableOption "puter docker service";
|
||||||
|
|
||||||
|
autoStart = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
httpPort = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "4100";
|
||||||
|
};
|
||||||
|
|
||||||
|
name = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "puter";
|
||||||
|
};
|
||||||
|
|
||||||
|
image = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "ghcr.io/heyputer/puter";
|
||||||
|
};
|
||||||
|
|
||||||
|
configPath = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "/home/admin/ssd/ssd_app_data/puter/config";
|
||||||
|
};
|
||||||
|
|
||||||
|
dataPath = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "/home/admin/ssd/ssd_app_data/puter/data";
|
||||||
|
};
|
||||||
|
|
||||||
|
puid = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "911";
|
||||||
|
};
|
||||||
|
|
||||||
|
pgid = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "1000";
|
||||||
|
};
|
||||||
|
|
||||||
|
timeZone = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "America/Chicago";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
./apps/ollama
|
./apps/ollama
|
||||||
./apps/open-webui
|
./apps/open-webui
|
||||||
./apps/orca-slicer
|
./apps/orca-slicer
|
||||||
|
./apps/puter
|
||||||
./apps/radarr
|
./apps/radarr
|
||||||
./apps/sabnzbd
|
./apps/sabnzbd
|
||||||
./apps/sonarr
|
./apps/sonarr
|
||||||
|
|||||||
Reference in New Issue
Block a user