# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’)
{ config, pkgs, lib, ... }:
{
imports =
[
../../modules/shared.nix
./services.nix
# ../../containers/homepage.nix
../../containers/radarr.nix
../../containers/sonarr.nix
../../containers/readarr.nix
../../containers/calibre.nix
../../containers/calibre-web.nix
../../containers/sabnzbd.nix
../../containers/prowlarr.nix
../../containers/jellyfin.nix
../../containers/caddy.nix
../../containers/dyalog-serve.nix
../../containers/dyalog-web.nix
../../containers/ollama.nix
];
networking.hostName = "biollante"; # Define your hostname.
fileSystems."/external-media" = {
device = "/dev/disk/by-uuid/18c8aea6-4ac9-413b-9a00-22da584dc4a9";
fsType = "ext4";
};
environment.systemPackages = with pkgs; [
dyalog
python3
pkgs.python3Packages.requests
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
];
nixpkgs.config.dyalog.acceptLicense = true;
services.xserver = {
enable = true;
xkb.layout = "us";
xkb.options = "apl";
};
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # For Broadwell (2015) or newer processors. LIBVA_DRIVER_NAME=iHD
# intel-vaapi-driver # For older processors. LIBVA_DRIVER_NAME=i965
];
};
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; # Optionally, set the env var
virtualisation.docker.enable = true;
environment.interactiveShellInit = ''
alias wn='emacsclient ~/notes/work-notes.org'
PS1="\n┌──(\u@\h)-[\[\w\]]\n└─> "
'';
nix.settings.experimental-features = [ "nix-command" "flakes" ];
systemd.services = {
only-ai = {
description = "Only AI Chat Application";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Type = "simple";
User = "jacob";
ExecStart = "/home/jacob/.services/only-ai/result/bin/start-app";
Restart = "always";
RestartSec = "10";
};
};
only-tasks = {
description = "Only Tasks Application";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Type = "simple";
User = "jacob";
ExecStart = "/home/jacob/.services/only-tasks/result/bin/task-manager 4000";
Restart = "always";
RestartSec = "10";
WorkingDirectory = "/home/jacob/.services/only-tasks";
Environment = "PORT=4000";
};
};
};
#allow chat ai to work
networking.firewall.allowedTCPPorts = [ 3000 5000
4000];
}
{ config, pkgs, ... } :
{
services = {
ttyd = {
enable = true;
writeable = true;
port = 7681;
terminalType = "xterm-direct";
entrypoint = [ "${pkgs.shadow}/bin/login" ];
#extraOptions = "new -A -s ttyd";
};
syncthing = {
enable = true;
guiAddress = "0.0.0.0:8384";
user = "jacob";
configDir = "/home/jacob/.config/syncthing";
};
webdav-server-rs = {
enable = true;
settings = {
server.listen = [ "0.0.0.0:4918" "[::]:4918" ];
location = [
{
route = [ "/public/*path" ];
directory = "/home/jacob/notes";
handler = "filesystem";
methods = [ "webdav-rw" ];
autoindex = true;
auth = "false";
}
];
};
};
emacs = {
enable = true;
};
};
#for ttyd
networking.firewall.allowedTCPPorts = [ 7681
#syncthing
8384
22000
#webdav
4918
];
#for syncthing
networking.firewall.allowedUDPPorts = [ 22000 21027 ];
}
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, lib, ... }:
{
imports =
[ ../../modules/shared.nix
../../containers/frigate.nix
../../containers/hass.nix
../../containers/zwavejs.nix
../../containers/matter-server.nix
../../containers/faster-whisper.nix
../../containers/mosquitto.nix
../../containers/openwakeword.nix
../../containers/piper.nix
];
networking.hostName = "ghidorah"; # Define your hostname.
networking.firewall.enable = false;
fileSystems."/external-media" = {
device = "/dev/disk/by-uuid/c2cfd22f-7dbb-49f4-9ac7-208e3f28e4ca";
fsType = "ext4";
};
environment.systemPackages = with pkgs; [
# python-matter-server
];
# services.matter-server = {
# enable = true;
# port = 5580;
# };
# networking.firewall.allowedTCPPorts = [ 5580
# ];
# networking.firewall.allowedUDPPorts = [ 5580
# ];
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # For Broadwell (2015) or newer processors. LIBVA_DRIVER_NAME=iHD
# intel-vaapi-driver # For older processors. LIBVA_DRIVER_NAME=i965
];
};
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; # Optionally, set the env var
virtualisation.docker.enable = true;
}
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, lib, ... }:
{
imports =
[ ../../modules/shared.nix
./packages.nix
./services.nix
];
networking.hostName = "rodan"; # Define your hostname.
}
{ config, pkgs, lib, ... }:
{
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
git
gh
syncthing
cloudflare-warp
tree
guile_3_0
kitty
emacs
python3
hyprland
hyprlock
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
rofi-wayland
waybar
hyprpaper
wl-clipboard
cliphist
brave
kodi
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
];
}
{
services = {
syncthing = {
enable = true;
user = "jacob";
dataDir = "/home/jacob/Documents";
configDir = "/home/jacob/.config/syncthing";
};
pipewire = {
enable = true;
pulse.enable = true;
};
};
}
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, lib, ... }:
{
imports =
[ ../../modules/shared.nix
./packages.nix
./services.nix
];
networking.hostName = "kumonga"; # Define your hostname.
nix.settings.experimental-features = [ "nix-command" "flakes" ];
#allow chat ai to work
networking.firewall.allowedTCPPorts = [ 3000 5000 8000 ];
programs.appimage = {
enable = true;
binfmt = true;
};
}
{ config, pkgs, lib, ... }:
{
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
git
gh
syncthing
cloudflare-warp
tree
guile_3_0
kitty
python3
stack
hyprland
hyprpaper
hypridle
hyprlock
xdg-desktop-portal-hyprland
# hyprsysteminfo
hyprsunset
hyprpolkitagent
# hyprland-qt-support
hyprcursor
hyprutils
hyprlang
hyprwayland-scanner
aquamarine
# hyprgraphics
# hyprland-qtutils
rofi-wayland
waybar
wl-clipboard
wlroots
pipewire
xwayland
cliphist
brave
kodi
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
];
services.dbus.enable = true;
# services.elogind.enable = true;
programs.appimage.enable = true;
programs.appimage.binfmt = true;
}
{
services = {
syncthing = {
enable = true;
user = "jacob";
dataDir = "/home/jacob/Documents";
configDir = "/home/jacob/.config/syncthing";
};
pipewire = {
enable = true;
pulse.enable = true;
};
};
}
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
git
gh
syncthing
tree
guile_3_0
kitty
emacs30-pgtk
python3
ghc
hyprland
hyprlock
wofi
tofi
waybar
hyprpaper
wl-clipboard
dmenu-rs
cliphist
brave
kodi
cifs-utils
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
];
programs.hyprland.enable = true;
programs.hyprlock.enable = true;
fonts.packages = with pkgs; [
font-awesome
];
system.activationScripts = {
mnt = {
text = "mkdir -p /mnt/nas-media";
deps = [];
};
};
fileSystems."/mnt/nas-shared" = {
device = "//192.168.3.196/Shared";
fsType = "cifs";
options = [
"guest" # No username/password required
"noperm"
"uid=1000"
"gid=1000"
"file_mode=0777"
"dir_mode=0777"
];
};
fileSystems."/mnt/nas-media" = {
device = "//192.168.3.196/Media";
fsType = "cifs";
options = [
"guest" # No username/password required
"noperm"
"uid=1000"
"gid=1000"
"file_mode=0777"
"dir_mode=0777"
];
};
}
{lib, ...}: let
contName = "homepage";
in {
virtualisation.oci-containers.containers."${contName}" = {
hostname = "${contName}";
autoStart = true;
image = "ghcr.io/gethomepage/${toString contName}:latest";
volumes = [
"/home/jacob/.config/homepage:/app/config"
"/run/user/1000/podman/podman.sock:/var/run/docker.sock"
];
ports = [
"3000:3000"
];
environment = {
PUID = "1000";
PGID = "1000";
};
};
}
{lib, ...}: let
contName = "radarr";
dir1 = "/etc/oci.cont/${contName}";
in {
system.activationScripts."make${contName}Dir" = lib.stringAfter ["var"] ''
mkdir -v -p ${toString dir1} & chown 1000:1000 ${toString dir1}
'';
virtualisation.oci-containers.containers."${contName}" = {
hostname = "${contName}";
autoStart = true;
image = "ghcr.io/linuxserver/${toString contName}:latest";
volumes = [
"/etc/localtime:/etc/localtime:ro"
"${toString dir1}:/config"
"/external-media/data:/data"
"/mnt/nas-media:/data/nas-media/"
];
ports = [
"7878:7878"
];
environment = {
PUID = "1000";
PGID = "1000";
};
# extraOptions = [
# "--network=macvlan_lan"
# "--ip=192.168.87.32"
# ];
};
}
{lib, ...}: let
contName = "sonarr";
dir1 = "/etc/oci.cont/${contName}";
in {
system.activationScripts."make${contName}Dir" = lib.stringAfter ["var"] ''
mkdir -v -p ${toString dir1} & chown 1000:1000 ${toString dir1}
'';
virtualisation.oci-containers.containers."${contName}" = {
hostname = "${contName}";
autoStart = true;
image = "ghcr.io/linuxserver/${toString contName}:latest";
volumes = [
"/etc/localtime:/etc/localtime:ro"
"${toString dir1}:/config"
"/external-media/data:/data"
"/mnt/nas-media:/data/nas-media/"
];
ports = [
"8989:8989"
];
environment = {
PUID = "1000";
PGID = "1000";
};
# extraOptions = [
# "--network=macvlan_lan"
# "--ip=192.168.87.32"
# ];
};
}
{lib, ...}: let
contName = "readarr";
dir1 = "/etc/oci.cont/${contName}";
in {
system.activationScripts."make${contName}Dir" = lib.stringAfter ["var"] ''
mkdir -v -p ${toString dir1} & chown 1000:1000 ${toString dir1}
'';
virtualisation.oci-containers.containers."${contName}" = {
hostname = "${contName}";
autoStart = true;
image = "ghcr.io/linuxserver/${toString contName}:develop";
volumes = [
"/etc/localtime:/etc/localtime:ro"
"${toString dir1}:/config"
"/external-media/data:/data"
];
ports = [
"8787:8787"
];
environment = {
PUID = "1000";
PGID = "1000";
};
# extraOptions = [
# "--network=macvlan_lan"
# "--ip=192.168.87.32"
# ];
};
}
{lib, ...}: let
contName = "prowlarr";
dir1 = "/etc/oci.cont/${contName}";
in {
system.activationScripts."make${contName}Dir" = lib.stringAfter ["var"] ''
mkdir -v -p ${toString dir1} & chown 1000:1000 ${toString dir1}
'';
virtualisation.oci-containers.containers."${contName}" = {
hostname = "${contName}";
autoStart = true;
image = "ghcr.io/linuxserver/${toString contName}:latest";
volumes = [
"/etc/localtime:/etc/localtime:ro"
"${toString dir1}:/config"
];
ports = [
"9696:9696"
];
environment = {
PUID = "1000";
PGID = "1000";
};
# extraOptions = [
# "--network=macvlan_lan"
# "--ip=192.168.87.32"
# ];
};
}
{lib, ...}: let
contName = "calibre";
dir1 = "/etc/oci.cont/${contName}/config";
in {
system.activationScripts."make${contName}Dir" = lib.stringAfter ["var"] ''
mkdir -v -p ${toString dir1} & chown 1000:1000 ${toString dir1}
'';
virtualisation.oci-containers.containers."${contName}" = {
hostname = "${contName}";
autoStart = true;
image = "ghcr.io/linuxserver/${toString contName}:latest";
volumes = [
"/etc/localtime:/etc/localtime:ro"
"${toString dir1}:/config"
"/external-media/data/media/books:/data/media/books"
];
ports = [
"8980:8080"
"8981:8081"
];
environment = {
PUID = "1000";
PGID = "1000";
};
};
}
{lib, ...}: let
contName = "calibre-web";
dir1 = "/etc/oci.cont/${contName}/config";
in {
system.activationScripts."make${contName}Dir" = lib.stringAfter ["var"] ''
mkdir -v -p ${toString dir1} & chown 1000:1000 ${toString dir1}
'';
virtualisation.oci-containers.containers."${contName}" = {
hostname = "${contName}";
autoStart = true;
image = "ghcr.io/linuxserver/${toString contName}:latest";
volumes = [
"/etc/localtime:/etc/localtime:ro"
"${toString dir1}:/config"
"/external-media/data/media/books:/data/media/books"
];
ports = [
"8083:8083"
];
environment = {
PUID = "1000";
PGID = "1000";
};
};
}
{lib, ...}: let
contName = "sabnzbd";
dir1 = "/etc/oci.cont/${contName}";
in {
system.activationScripts."make${contName}Dir" = lib.stringAfter ["var"] ''
mkdir -v -p ${toString dir1} & chown 1000:1000 ${toString dir1}
'';
virtualisation.oci-containers.containers."${contName}" = {
hostname = "${contName}";
autoStart = true;
image = "ghcr.io/linuxserver/${toString contName}:latest";
volumes = [
"/etc/localtime:/etc/localtime:ro"
"${toString dir1}:/config"
"/external-media/data/usenet:/data/usenet" "/mnt/nas-media/downloads/usenet:/data/nas-media/downloads/usenet"
];
ports = [
"2000:8080"
];
environment = {
PUID = "1000";
PGID = "1000";
};
# extraOptions = [
# "--network=macvlan_lan"
# "--ip=192.168.87.32"
# ];
};
}
{lib, ...}: let
contName = "jellyfin";
dir1 = "/etc/oci.cont/${contName}/config";
in {
system.activationScripts."make${contName}Dir" = lib.stringAfter ["var"] ''
mkdir -v -p ${toString dir1} & chown 1000:1000 ${toString dir1}
'';
virtualisation.oci-containers.containers."${contName}" = {
hostname = "${contName}";
autoStart = true;
image = "ghcr.io/linuxserver/${toString contName}:10.10.3ubu2404-ls42";
volumes = [
"/etc/localtime:/etc/localtime:ro"
"${toString dir1}:/config"
"/external-media/data/media:/data/media"
"/mnt/nas-media:/data/nas-media/"
];
ports = [
"8096:8096"
];
environment = {
PUID = "1000";
PGID = "1000";
};
extraOptions = [
# "--network=macvlan_lan"
# "--ip=192.168.87.32"
"--device=/dev/dri"
];
};
}
{lib, ...}: let
contName = "caddy";
dir1 = "/etc/oci.cont/${contName}/config";
dir2 = "/etc/oci.cont/${contName}/data";
dir3 = "/etc/oci.cont/${contName}/site";
in {
system.activationScripts."make${contName}Dir" = lib.stringAfter ["var"] ''
mkdir -v -p ${toString dir1} && mkdir -v -p ${toString dir2} && mkdir -v -p ${toString dir3}
'';
virtualisation.oci-containers.containers."${contName}" = {
hostname = "${contName}";
autoStart = true;
image = "${toString contName}:latest";
volumes = [
"${toString dir1}:/config"
"${toString dir2}:/data"
"${toString dir3}:/srv"
"/home/jacob/.config/caddy/Caddyfile:/etc/caddy/Caddyfile"
];
ports = [
"80:80"
"443:443"
"443:443/udp"
];
environment = {
PUID = "1000";
PGID = "1000";
};
};
}
{lib, ...}: let
contName = "organice";
in {
virtualisation.oci-containers.containers."${contName}" = {
hostname = "${contName}";
autoStart = true;
image = "twohundredok/${toString contName}:latest";
ports = [
"5000:5000"
];
environment = {
ORGANICE_WEBDAV_URL = "http://192.168.3.101:8080"
};
};
}
{
config,
pkgs,
lib,
...
}: let
contName = "frigate";
rtmp = 1935;
web = 5000;
rtsp = 8554;
webRTC = 8555;
dir1 = "/etc/oci.cont/${contName}/db";
dir2 = "/external-media/${contName}/media";
dir3 = "/home/jacob/.config/${contName}";
in {
system.activationScripts.makeFrigateDir = lib.stringAfter ["var"] ''
mkdir -v -p ${toString dir1} ${toString dir2}
'';
# make tmpdir for frigate to use, ssd wear bla bla, probs isnt even working :)
fileSystems."/tmp/cache" = {
device = "none";
fsType = "tmpfs";
options = ["defaults" "size=1G" "mode=755"];
};
virtualisation.oci-containers.containers.${contName} = {
hostname = "${contName}";
autoStart = true;
image = "ghcr.io/blakeblackshear/frigate:0.15.0-beta4";
ports = [
"1984:1984"
"${toString rtmp}:${toString rtmp}"
"${toString web}:${toString web}"
"${toString rtsp}:${toString rtsp}"
"${toString webRTC}:${toString webRTC}/tcp"
"${toString webRTC}:${toString webRTC}/udp"
];
volumes = [
"${toString dir1}:/db"
"${toString dir2}:/media/frigate"
"${toString dir3}:/config"
"/etc/localtime:/etc/localtime:ro"
];
extraOptions = [
# "--network=macvlan_lan"
# "--ip=${secrets.ip.frigate}"
"--privileged"
"--shm-size=512m"
# "--device=/dev/bus/usb:/dev/bus/usb" # coral
"--device=/dev/dri/renderD128" # gpu
"--mount=type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000" # tempfs
];
};
}
{
pkgs,
lib,
...
}: let
contName = "hass";
dir1 = "/etc/oci.cont/${contName}/config";
in {
system.activationScripts.makeFrigateDir = lib.stringAfter ["var"] ''
mkdir -v -p ${toString dir1}
'';
virtualisation.oci-containers.containers.${contName} = {
hostname = "${contName}";
autoStart = true;
image = "ghcr.io/home-assistant/home-assistant:2024.11";
ports = [
"8123:8123"
];
volumes = [
"${dir1}:/config"
"/var/run/dbus:/run/dbus:ro"
"/etc/localtime:/etc/localtime:ro"
"home-assistant-dockerenv:/.dockerenv"
];
extraOptions = [
"--net=host"
];
};
}
{
pkgs,
lib,
...
}: let
contName = "matter-server";
dir1 = "/etc/oci.cont/${contName}/config";
in {
system.activationScripts.makeMatterServerDir = lib.stringAfter ["var"] ''
mkdir -v -p ${toString dir1}
'';
virtualisation.oci-containers.containers.${contName} = {
hostname = "${contName}";
autoStart = true;
image = "ghcr.io/home-assistant-libs/python-matter-server:6.6";
extraOptions = [ "--net=host"
"--privileged" ];
volumes = [
"${dir1}:/data/"
"/var/run/dbus:/run/dbus:ro"
"/etc/localtime:/etc/localtime:ro"
];
};
}
{
pkgs,
lib,
...
}: let
contName = "zwavejs";
dir1 = "/etc/oci.cont/${contName}/store";
in {
system.activationScripts.makeFrigateDir = lib.stringAfter ["var"] ''
mkdir -v -p ${toString dir1}
'';
virtualisation.oci-containers.containers.${contName} = {
hostname = "${contName}";
autoStart = true;
image = "zwavejs/zwave-js-ui:9.27.2";
ports = [
"8091:8091"
"3000:3000"
];
volumes = [
"${dir1}:/usr/src/app/store"
];
extraOptions = [
"--device=/dev/serial/by-id/usb-Silicon_Labs_Zooz_ZST10_700_Z-Wave_Stick_d8b3184ecd60ec119a403f7625bfaa52-if00-port0:/dev/zwave"
];
};
}
{
config,
pkgs,
lib,
...
}: let
contName = "dyalog-serve";
in {
virtualisation.oci-containers.containers.${contName} = {
hostname = "${contName}";
autoStart = true;
image = "dyalog/dyalog";
ports = [
"4502:4502"
];
volumes = [
"/external-media/data/dyalog:/files"
];
environment = {
RIDE_INIT = "serve:*:4502";
};
};
}
{
config,
pkgs,
lib,
...
}: let
contName = "dyalog-web";
in {
virtualisation.oci-containers.containers.${contName} = {
hostname = "${contName}";
autoStart = true;
image = "dyalog/dyalog";
ports = [
"8888:8888"
];
volumes = [
"/external-media/data/dyalog:/files"
];
environment = {
RIDE_INIT = "http:*:8888";
};
};
}
{ config, pkgs, ... }:
{
virtualisation = {
oci-containers = {
backend = "podman";
containers = {
ollama = {
image = "docker.io/ollama/ollama:latest";
autoStart = true;
ports = [
"11434:11434"
];
volumes = [
"ollama:/root/.ollama"
];
};
};
};
};
}
{ lib,config, pkgs, ... }:
let
contName = "faster-whisper";
dir1 = "/etc/oci.cont/${contName}/config";
in {
system.activationScripts."make${contName}Dir" = lib.stringAfter ["var"] ''
mkdir -v -p ${toString dir1}
'';
virtualisation = {
oci-containers = {
containers.faster-whisper = {
image = "lscr.io/linuxserver/faster-whisper:latest"; # Use the latest tag or specify another
autoStart = true;
ports = [
"10300:10300" # Expose the default port for faster-whisper
];
volumes = [
"${toString dir1}:/config" # Mount volume for configuration data
];
environment = {
PUID = "1000"; # User ID to run the container as
PGID = "1000"; # Group ID to run the container as
TZ = "Chicago/America"; # Timezon
WHISPER_MODEL = "tiny-int8"; # Set your model
WHISPER_LANG = "en"; # Optional language setting
};
# If using GPU
# extraOptions = [ "--gpus=all" ];
};
};
};
# networking.firewall = {
# enable = true;
# allowedTCPPorts = [ 10300 ]; # Include both SSH and Whisper ports
# If you need UDP as well
# allowedUDPPorts = [ 10300 ];
# };
# Ensure necessary packages are available
environment.systemPackages = with pkgs; [
podman
nvidia-docker # If you're using NVIDIA GPUs
];
}
{lib, ...}: let
contName = "mosquitto";
dir1 = "/etc/oci.cont/${contName}";
in {
system.activationScripts."make${contName}Dir" = lib.stringAfter ["var"] ''
mkdir -v -p ${toString dir1}/config &
mkdir -v -p ${toString dir1}/data &
mkdir -v -p ${toString dir1}/log
'';
virtualisation.oci-containers.containers."${contName}" = {
hostname = "${contName}";
autoStart = true;
image = "eclipse-mosquitto:latest";
volumes = [
"/etc/localtime:/etc/localtime:ro"
# "${toString dir1}/config:/mosquitto/config"
"${toString dir1}/data:/mosquitto/data"
"${toString dir1}/log:/mosquitto/log"
];
ports = [
"1883:1883" # MQTT
"9001:9001" # WebSocket
];
environment = {
PUID = "1000";
PGID = "1000";
};
};
}
{ lib, config, pkgs, ... }:
let
contName = "openwakeword";
dir1 = "/etc/oci.cont/${contName}/config";
in {
system.activationScripts."make${contName}Dir" = lib.stringAfter ["var"] ''
mkdir -v -p ${toString dir1}
'';
virtualisation = {
oci-containers = {
containers.openwakeword = {
image = "rhasspy/wyoming-openwakeword:latest";
autoStart = true;
ports = [
"10400:10400" # Default port for OpenWakeWord
];
volumes = [
"${toString dir1}:/config" # Mount volume for configuration data
];
environment = {
PUID = "1000"; # User ID to run the container as
PGID = "1000"; # Group ID to run the container as
TZ = "America/Chicago"; # Your timezone
# OpenWakeWord specific settings
WAKE_WORDS = "hey_jarvis"; # Comma-separated list of wake words
THRESHOLD = "0.5"; # Detection threshold (0-1)
DEBUG = "1"; # Enable debug logging
};
extraOptions = [
"--log-level=debug"
];
};
};
};
# Ensure necessary packages are available
environment.systemPackages = with pkgs; [
podman
];
# Open firewall port
networking.firewall = {
allowedTCPPorts = [ 10400 ];
};
}
{ config, pkgs, lib, ... }:
let
contName = "piper";
dir1 = "/etc/oci.cont/${contName}/config";
in
{
virtualisation.oci-containers.containers.piper = {
image = "rhasspy/wyoming-piper:latest";
ports = [
{
hostAddress = "0.0.0.0";
hostPort = 10200;
containerPort = 10200;
}
];
volumes = [
"${toString dir1}:/data"
];
extraOptions = [
"--voice"
"en_US-lessac-medium"
];
};
}