restructure
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
{ ... }: {
|
||||
|
||||
|
||||
flake.nixosModules.default = { lib, ... }: {
|
||||
|
||||
config = {
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,119 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.default = { config, lib, pkgs, ... }: let
|
||||
flake.nixosModules.default = { config, lib, ... }: {
|
||||
|
||||
options.sysconfig.containers.gitea.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.containers.gitea.enable {
|
||||
|
||||
networking = {
|
||||
nat.internalInterfaces = [ "ve-gitea" ];
|
||||
};
|
||||
|
||||
sops.secrets = {
|
||||
"gitea/dbpass" = {};
|
||||
};
|
||||
|
||||
containers.gitea = {
|
||||
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.20";
|
||||
|
||||
bindMounts = {
|
||||
"/etc/gitea/data" = {
|
||||
hostPath = "/ssd1/Gitea/data";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
|
||||
extraFlags = [
|
||||
"--load-credential=dbpass:${config.sops.secrets."gitea/dbpass".path}"
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
systemd.services.secrets_setup = {
|
||||
wantedBy = [ "gitea.service" ];
|
||||
|
||||
serviceConfig = {
|
||||
LoadCredential = [
|
||||
"dbpass"
|
||||
];
|
||||
};
|
||||
|
||||
script = ''
|
||||
cat ''${CREDENTIALS_DIRECTORY}/dbpass > /etc/gitea/dbpass
|
||||
chown gitea:gitea /etc/gitea/*
|
||||
'';
|
||||
};
|
||||
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
|
||||
stateDir = "/etc/gitea/data";
|
||||
|
||||
dump.enable = false;
|
||||
|
||||
appName = "Gitea";
|
||||
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "gitea.esotericbytes.com";
|
||||
HTTP_PORT = 3000;
|
||||
ROOT_URL = "https://gitea.esotericbytes.com/";
|
||||
};
|
||||
service = {
|
||||
DISABLE_REGISTRATION = false;
|
||||
ALLOW_ONLY_EXTERNAL_REGISTRATION = true;
|
||||
REQUIRE_SIGNIN_VIEW = false;
|
||||
};
|
||||
oauth2_client = {
|
||||
ENABLE_AUTO_REGISTRATION = true;
|
||||
};
|
||||
session.COOKIE_SECURE = true;
|
||||
|
||||
cron = {
|
||||
ENABLED = true;
|
||||
RUN_AT_START = true;
|
||||
};
|
||||
|
||||
repository = {
|
||||
DEFAULT_BRANCH = "master";
|
||||
};
|
||||
};
|
||||
|
||||
database = {
|
||||
passwordFile = "/etc/gitea/dbpass";
|
||||
type = "postgres";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
PermitRootLogin = lib.mkForce "no";
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
};
|
||||
ports = [ 2222 ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 3000 ];
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
flake.nixosModules.gitea-docker = { config, lib, pkgs, ... }: let
|
||||
|
||||
subdomain = "gitea";
|
||||
|
||||
@@ -151,4 +264,5 @@
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
@@ -58,4 +58,18 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
flake.nixosModules.home-assistant-vm = { config, lib, ... }: {
|
||||
|
||||
options.sysconfig.virtual-machines.home-assistant = {
|
||||
enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.virtual-machines.home-assistant.enable {
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,46 @@
|
||||
{ ... }: {
|
||||
{ inputs, ... }: {
|
||||
|
||||
|
||||
flake.nixosModules.default = { config, lib, pkgs, ... }: {
|
||||
|
||||
options.sysconfig = {
|
||||
|
||||
services.netbird.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
pkgs-us = import inputs.nixpkgs-us {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
in lib.mkIf config.sysconfig.services.netbird.enable {
|
||||
|
||||
services.netbird = {
|
||||
enable = lib.mkDefault config.sysconfig.services.netbird.enable;
|
||||
|
||||
clients.default = {
|
||||
port = 51820;
|
||||
name = "netbird";
|
||||
interface = "wt0";
|
||||
hardened = false;
|
||||
|
||||
ui = {
|
||||
enable = lib.mkDefault config.sysconfig.graphical;
|
||||
#package = pkgs-us.netbird-ui;
|
||||
#package = pkgs.netbird-ui;
|
||||
};
|
||||
};
|
||||
|
||||
package = pkgs-us.netbird;
|
||||
#package = pkgs.netbird;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
flake.nixosModules.netbird-docker = { config, lib, pkgs, ... }: {
|
||||
|
||||
options.sysconfig.docker.netbird.enable = with lib; mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
@@ -2,6 +2,37 @@
|
||||
|
||||
flake.nixosModules.default = { config, lib, pkgs, ... }: {
|
||||
|
||||
options.sysconfig.services.novnc.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.services.novnc.enable {
|
||||
systemd.services.novnc = {
|
||||
enable = true;
|
||||
|
||||
path = with pkgs; [
|
||||
novnc
|
||||
ps
|
||||
];
|
||||
|
||||
script = ''
|
||||
novnc --listen 80 --vnc 127.0.0.1:5900
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
Type = "exec";
|
||||
};
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
};
|
||||
};
|
||||
|
||||
flake.nixosModules.ntfy-container = { config, lib, pkgs, ... }: {
|
||||
|
||||
options.sysconfig.containers.novnc.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
@@ -52,4 +83,6 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,32 @@
|
||||
{ ... }: {
|
||||
{ inputs, ... }: {
|
||||
|
||||
flake.nixosModules.default = { config, lib, pkgs, ... }: let
|
||||
flake.nixosModules.default = { config, lib, ... }: {
|
||||
|
||||
options = {
|
||||
sysconfig.services.ollama.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.services.ollama.enable {
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "cuda";
|
||||
environmentVariables = {
|
||||
OLLAMA_CONTEXT_LENGTH = lib.mkDefault "16000";
|
||||
};
|
||||
package = let
|
||||
pkgs-us = import inputs.nixpkgs-us {
|
||||
system = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in pkgs-us.ollama-cuda;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
flake.nixosModules.ollama-docker = { config, lib, pkgs, ... }: let
|
||||
|
||||
hostPort = 11434;
|
||||
|
||||
@@ -74,3 +100,4 @@
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
flake.nixosModules.default = { pkgs, ... }: {
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
age
|
||||
sops
|
||||
inputs.disko.packages.${pkgs.stdenv.hostPlatform.system}.disko-install
|
||||
];
|
||||
@@ -1,41 +0,0 @@
|
||||
{ inputs, ... }: {
|
||||
|
||||
flake.nixosModules.default = { config, lib, pkgs, ... }: {
|
||||
|
||||
options.sysconfig = {
|
||||
|
||||
services.netbird.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
pkgs-us = import inputs.nixpkgs-us {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
in lib.mkIf config.sysconfig.services.netbird.enable {
|
||||
|
||||
services.netbird = {
|
||||
enable = lib.mkDefault config.sysconfig.services.netbird.enable;
|
||||
|
||||
clients.default = {
|
||||
port = 51820;
|
||||
name = "netbird";
|
||||
interface = "wt0";
|
||||
hardened = false;
|
||||
|
||||
ui = {
|
||||
enable = lib.mkDefault config.sysconfig.graphical;
|
||||
#package = pkgs-us.netbird-ui;
|
||||
#package = pkgs.netbird-ui;
|
||||
};
|
||||
};
|
||||
|
||||
package = pkgs-us.netbird;
|
||||
#package = pkgs.netbird;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.default = { config, lib, pkgs, ... }: {
|
||||
|
||||
options.sysconfig.services.novnc.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.services.novnc.enable {
|
||||
systemd.services.novnc = {
|
||||
enable = true;
|
||||
|
||||
path = with pkgs; [
|
||||
novnc
|
||||
ps
|
||||
];
|
||||
|
||||
script = ''
|
||||
novnc --listen 80 --vnc 127.0.0.1:5900
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
Type = "exec";
|
||||
};
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
{ inputs, ... }: {
|
||||
|
||||
flake.nixosModules.default = { config, lib, ... }: {
|
||||
|
||||
options = {
|
||||
sysconfig.services.ollama.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.services.ollama.enable {
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "cuda";
|
||||
environmentVariables = {
|
||||
OLLAMA_CONTEXT_LENGTH = lib.mkDefault "16000";
|
||||
};
|
||||
package = let
|
||||
pkgs-us = import inputs.nixpkgs-us {
|
||||
system = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in pkgs-us.ollama-cuda;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.default = { config, lib, ... }: {
|
||||
|
||||
options.sysconfig.services.wyoming = {
|
||||
enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
piper = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
openwakeword = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
faster-whisper = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
satellite = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.services.wyoming.enable {
|
||||
|
||||
services.wyoming = {
|
||||
|
||||
piper = lib.mkIf config.sysconfig.services.wyoming.piper {
|
||||
|
||||
servers.piper = {
|
||||
enable = true;
|
||||
voice = "en-us-ryan-medium";
|
||||
uri = "tcp://0.0.0.0:11435";
|
||||
};
|
||||
};
|
||||
|
||||
openwakeword = lib.mkIf config.sysconfig.services.wyoming.openwakeword {
|
||||
enable = true;
|
||||
uri = "tcp://0.0.0.0:11432";
|
||||
|
||||
threshold = 0.5;
|
||||
customModelsDirectories = [
|
||||
#./wake_words
|
||||
];
|
||||
};
|
||||
|
||||
faster-whisper = lib.mkIf config.sysconfig.services.wyoming.faster-whisper {
|
||||
servers.whisper = {
|
||||
enable = true;
|
||||
device = "auto";
|
||||
language = "en";
|
||||
model = "medium.en";
|
||||
uri = "tcp://0.0.0.0:11433";
|
||||
};
|
||||
};
|
||||
|
||||
satellite = lib.mkIf config.sysconfig.services.wyoming.satellite {
|
||||
enable = true;
|
||||
uri = "tcp://0.0.0.0:11431";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.default = { config, lib, pkgs, ... }: {
|
||||
|
||||
config = lib.mkIf (
|
||||
config.sysconfig.users ? nathan && config.sysconfig.users.nathan.usePresets
|
||||
) {
|
||||
|
||||
sops.secrets."nathan/pass".neededForUsers = true;
|
||||
|
||||
users.users.nathan = {
|
||||
shell = lib.mkDefault pkgs.zsh;
|
||||
name = lib.mkDefault "nathan";
|
||||
isNormalUser = lib.mkDefault true;
|
||||
#hashedPasswordFile = lib.mkIf (cfg.hashedPasswordFile != null) cfg.hashedPasswordFile;
|
||||
extraGroups = [ "networkmanager" "docker" "libvirtd" ];
|
||||
openssh.authorizedKeys.keys = with config.sysconfig.users.nathan; lib.mkIf config.sysconfig.services.openssh.enable (
|
||||
ssh.keys ++ (map (z: config.sysconfig.sshHostKeys.${z}) ssh.hosts)
|
||||
);
|
||||
packages = lib.mkIf (
|
||||
config.sysconfig.users.nathan.home-manager.enable && config.sysconfig.users.nathan.home-manager.standalone
|
||||
) [ pkgs.home-manager ];
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.default = { config, lib, ... }: {
|
||||
|
||||
options.sysconfig.containers.gitea.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.containers.gitea.enable {
|
||||
|
||||
networking = {
|
||||
nat.internalInterfaces = [ "ve-gitea" ];
|
||||
};
|
||||
|
||||
sops.secrets = {
|
||||
"gitea/dbpass" = {};
|
||||
};
|
||||
|
||||
containers.gitea = {
|
||||
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.20";
|
||||
|
||||
bindMounts = {
|
||||
"/etc/gitea/data" = {
|
||||
hostPath = "/ssd1/Gitea/data";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
|
||||
extraFlags = [
|
||||
"--load-credential=dbpass:${config.sops.secrets."gitea/dbpass".path}"
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
systemd.services.secrets_setup = {
|
||||
wantedBy = [ "gitea.service" ];
|
||||
|
||||
serviceConfig = {
|
||||
LoadCredential = [
|
||||
"dbpass"
|
||||
];
|
||||
};
|
||||
|
||||
script = ''
|
||||
cat ''${CREDENTIALS_DIRECTORY}/dbpass > /etc/gitea/dbpass
|
||||
chown gitea:gitea /etc/gitea/*
|
||||
'';
|
||||
};
|
||||
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
|
||||
stateDir = "/etc/gitea/data";
|
||||
|
||||
dump.enable = false;
|
||||
|
||||
appName = "Gitea";
|
||||
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "gitea.esotericbytes.com";
|
||||
HTTP_PORT = 3000;
|
||||
ROOT_URL = "https://gitea.esotericbytes.com/";
|
||||
};
|
||||
service = {
|
||||
DISABLE_REGISTRATION = false;
|
||||
ALLOW_ONLY_EXTERNAL_REGISTRATION = true;
|
||||
REQUIRE_SIGNIN_VIEW = false;
|
||||
};
|
||||
oauth2_client = {
|
||||
ENABLE_AUTO_REGISTRATION = true;
|
||||
};
|
||||
session.COOKIE_SECURE = true;
|
||||
|
||||
cron = {
|
||||
ENABLED = true;
|
||||
RUN_AT_START = true;
|
||||
};
|
||||
|
||||
repository = {
|
||||
DEFAULT_BRANCH = "master";
|
||||
};
|
||||
};
|
||||
|
||||
database = {
|
||||
passwordFile = "/etc/gitea/dbpass";
|
||||
type = "postgres";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
PermitRootLogin = lib.mkForce "no";
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
};
|
||||
ports = [ 2222 ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 3000 ];
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.default = { config, lib, ... }: {
|
||||
|
||||
options.sysconfig.containers.rustdesk.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.containers.rustdesk.enable {
|
||||
|
||||
/*networking = {
|
||||
firewall.allowedTCPPorts = [ 21115 21116 21117 21118 21119 ];
|
||||
firewall.allowedUDPPorts = [ 21116 ];
|
||||
};*/
|
||||
containers.rustdesk = {
|
||||
|
||||
autoStart = true;
|
||||
privateNetwork = true;
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.27";
|
||||
/* forwardPorts = [
|
||||
{
|
||||
containerPort = 21115;
|
||||
hostPort = 21115;
|
||||
protocol = "tcp";
|
||||
}
|
||||
{
|
||||
containerPort = 21116;
|
||||
hostPort = 21116;
|
||||
protocol = "tcp";
|
||||
}
|
||||
{
|
||||
containerPort = 21116;
|
||||
hostPort = 21116;
|
||||
protocol = "udp";
|
||||
}
|
||||
{
|
||||
containerPort = 21117;
|
||||
hostPort = 21117;
|
||||
protocol = "tcp";
|
||||
}
|
||||
{
|
||||
containerPort = 21118;
|
||||
hostPort = 21118;
|
||||
protocol = "tcp";
|
||||
}
|
||||
|
||||
{
|
||||
containerPort = 21119;
|
||||
hostPort = 21119;
|
||||
protocol = "tcp";
|
||||
}
|
||||
|
||||
|
||||
];*/
|
||||
config = {
|
||||
|
||||
services.rustdesk-server = {
|
||||
enable = true;
|
||||
|
||||
openFirewall = true;
|
||||
|
||||
relay = {
|
||||
enable = true;
|
||||
extraArgs = [
|
||||
"-k"
|
||||
"AAAAC3NzaC1lZDI1NTE5AAAAIIPztDjwgB3xCza5+p5z1jpGVYoVQNl3fqD69pPCm0NA"
|
||||
];
|
||||
};
|
||||
|
||||
signal = {
|
||||
enable = true;
|
||||
#relayHosts = [ "esotericbytes.com" ];
|
||||
relayHosts = [ "192.168.100.27" ];
|
||||
extraArgs = [
|
||||
"-k"
|
||||
"AAAAC3NzaC1lZDI1NTE5AAAAIIPztDjwgB3xCza5+p5z1jpGVYoVQNl3fqD69pPCm0NA"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{}
|
||||
@@ -1,17 +0,0 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.default = { config, lib, ... }: {
|
||||
|
||||
options.sysconfig.virtual-machines.home-assistant = {
|
||||
enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.virtual-machines.home-assistant.enable {
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,73 @@
|
||||
{ ... }: {
|
||||
|
||||
flake.nixosModules.default = { config, lib, ... }: {
|
||||
flake.nixosModules.wyoming = { config, lib, ... }: {
|
||||
|
||||
options.sysconfig.services.wyoming = {
|
||||
enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
piper = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
openwakeword = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
faster-whisper = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
satellite = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.services.wyoming.enable {
|
||||
|
||||
services.wyoming = {
|
||||
|
||||
piper = lib.mkIf config.sysconfig.services.wyoming.piper {
|
||||
|
||||
servers.piper = {
|
||||
enable = true;
|
||||
voice = "en-us-ryan-medium";
|
||||
uri = "tcp://0.0.0.0:11435";
|
||||
};
|
||||
};
|
||||
|
||||
openwakeword = lib.mkIf config.sysconfig.services.wyoming.openwakeword {
|
||||
enable = true;
|
||||
uri = "tcp://0.0.0.0:11432";
|
||||
|
||||
threshold = 0.5;
|
||||
customModelsDirectories = [
|
||||
#./wake_words
|
||||
];
|
||||
};
|
||||
|
||||
faster-whisper = lib.mkIf config.sysconfig.services.wyoming.faster-whisper {
|
||||
servers.whisper = {
|
||||
enable = true;
|
||||
device = "auto";
|
||||
language = "en";
|
||||
model = "medium.en";
|
||||
uri = "tcp://0.0.0.0:11433";
|
||||
};
|
||||
};
|
||||
|
||||
satellite = lib.mkIf config.sysconfig.services.wyoming.satellite {
|
||||
enable = true;
|
||||
uri = "tcp://0.0.0.0:11431";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
flake.nixosModules.wyoming-container = { config, lib, ... }: {
|
||||
|
||||
options.sysconfig.containers.wyoming = {
|
||||
enable = lib.options.mkOption {
|
||||
@@ -131,4 +198,5 @@
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user