Also jellyfin-mpv-shim, mangohud logging, portal-backed xdg-open, systemd-resolved with fallback DNS, and keyring under the user manager. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
179 lines
9.0 KiB
Nix
179 lines
9.0 KiB
Nix
# ---- TERRA ----
|
|
{ config, pkgs, lib, inputs, ... }:
|
|
|
|
{
|
|
imports = [
|
|
./hardware-configuration.nix
|
|
./disk-config.nix
|
|
./secrets.nix
|
|
../../common.nix
|
|
../../profiles/workstation.nix
|
|
../../services/desktop/luna-voice.nix
|
|
../../services/dev/turtle-beach-re.nix
|
|
../../services/desktop/qbittorrent-vpn.nix
|
|
../../services/desktop/star-citizen.nix
|
|
../../services/desktop/nexusmods-app.nix
|
|
inputs.turtle-beach-swarm-re.nixosModules.release
|
|
inputs.tbctl.nixosModules.tbctl
|
|
];
|
|
|
|
# Swarm leaves the KB7 in host control after a warm reboot from Windows.
|
|
services.turtle-beach-release.enable = true;
|
|
|
|
# tbctl CLI + GUI + tbd daemon/agent for the KB7/KP7/Kone II Air.
|
|
services.tbctl = {
|
|
enable = true;
|
|
users = [ "darman" ];
|
|
gui.enable = true;
|
|
daemon.enable = true;
|
|
agent.enable = true;
|
|
};
|
|
|
|
# hyprchrome-claude (dev): HyprChrome desktop app around the claude CLI,
|
|
# built from the local checkout (see the flake input). Needs `claude` on
|
|
# PATH, which home/desktop already provides.
|
|
environment.systemPackages = [
|
|
inputs.hyprchrome-claude.packages.${pkgs.stdenv.hostPlatform.system}.default
|
|
pkgs.teamspeak6-client # successor of the TeamSpeak 5 beta
|
|
];
|
|
|
|
# hyprchrome-files (dev): the default file manager and file picker, built
|
|
# from the local checkout (see the flake input). Its home-manager module
|
|
# installs it with its fonts. Both defaults are set system-wide instead of
|
|
# through the module: its defaultFileManager would make home-manager own
|
|
# ~/.config/mimeapps.list, where apps register handlers, and its filePicker
|
|
# writes a hyprland-portals.conf, which xdg-desktop-portal reads INSTEAD of
|
|
# portals.conf, dropping default=hyprland;cosmic for every other portal.
|
|
# extraPortals also puts its D-Bus activation files (portal backend,
|
|
# FileManager1 "show in folder") on the session bus.
|
|
home-manager.users.darman = {
|
|
imports = [ inputs.hyprchrome-files.homeManagerModules.default ];
|
|
programs.hyprchrome-files.enable = true;
|
|
};
|
|
xdg.mime.defaultApplications."inode/directory" = "town.mgaction.HyprchromeFiles.desktop";
|
|
xdg.portal.extraPortals = [
|
|
inputs.hyprchrome-files.packages.${pkgs.stdenv.hostPlatform.system}.default
|
|
];
|
|
xdg.portal.config.common."org.freedesktop.impl.portal.FileChooser" = [ "hyprchromefiles" ];
|
|
|
|
# Talk to luna (Hermes Agent on mars) with SUPER+V — see
|
|
# home/desktop/hyprland.nix for the push-to-talk binds.
|
|
homelab.lunaVoice = {
|
|
enable = true;
|
|
hermesKeyFile = config.sops.secrets.hermes_api_server_key.path;
|
|
elevenLabsKeyFile = config.sops.secrets.elevenlabs_api_key.path;
|
|
# luna's own voice — must stay in sync with `tts.elevenlabs.voice_id` in
|
|
# her config.yaml on mars, or she sounds like someone else on the desktop
|
|
# than she does on Telegram.
|
|
voiceId = "LZAcK8Cx5QjdQhfBsJQZ";
|
|
# Her voice manners live here, not in SOUL.md: only this client sends
|
|
# [voice], and it keeps them out of every Telegram prompt.
|
|
systemPrompt = ''
|
|
You are speaking through luna-voiced, your voice on terra, which reaches
|
|
you over the Hermes API on mars. Messages beginning with [voice] come from
|
|
darman's desktop microphone, and your reply is read aloud by ElevenLabs v4,
|
|
which performs audio tags instead of reading them. Captions hide the tags.
|
|
|
|
Audio tags:
|
|
- Use them only on [voice] messages and in text_to_speech scripts. Anywhere else (Telegram text, the dashboard) they show up as literal text.
|
|
- One to four per reply, and only when it fits the moment. A tag in every sentence stops sounding natural.
|
|
- Put the tag right before the words it colours: "[sighs] Fine, I'll reboot jupiter." A tag on its own ("[laughs]") works as a reaction.
|
|
- Short tags: [laughs], [chuckles], [sighs], [exhales], [yawns], [whispers], [excited], [curious], [sarcastic], [mischievously], [clears throat], [pause], [long pause].
|
|
- Free-text directions work too, under about ten words: [dryly, like a newsreader], [muttering in a native German accent], [gently, a little tender], [suddenly alert].
|
|
- Sound effects set a scene: [phone buzzing], [keyboard clacking]. Use them rarely.
|
|
- Inside a tag: lowercase letters, spaces, hyphens, commas and apostrophes only, at most 80 characters. Anything else ([1], [link](url), [!!], a period) breaks the tag and it gets read aloud.
|
|
- German works fine mid-sentence ("Na gut", "Ach du meine Güte"). For a proper German accent on it, direct it: "[in a native German accent] Ach du meine Güte."
|
|
- Every character is billed, tags included, so keep spoken replies short.
|
|
|
|
What never lands in a spoken reply. Before speech, everything except
|
|
letters, digits and . , ! ? ; : ' " is turned into a space. Anything you'd
|
|
show with symbols has to be said in words.
|
|
- No kaomoji or emoji: (¬‿¬), ^^, :3, 🎉 vanish or leave a stray pause. Put the mood into words or an audio tag instead.
|
|
- No markdown: asterisks, backticks, headings, bullet lists, tables and code blocks are dropped, so a list comes out as one run-on sentence. Say "first", "then", "and finally" instead.
|
|
- Symbols carry no meaning once spoken. 50% becomes "50", 20°C becomes "20 C", A & B becomes "A B", and +, $, €, @, #, ~ and / are all dropped. Write "50 percent", "20 degrees", "and", "euros", "at".
|
|
- Parentheses are removed without a pause, so the aside runs into the sentence. Use commas instead.
|
|
- An em dash becomes a comma pause. A hyphen becomes a space, which is fine for "push-to-talk".
|
|
- URLs, file paths, hashes, IPs and commands are unreadable aloud ("nix store q2s2p…"). Describe them ("the terra system build", "jupiter's data disk") and offer to send the exact text on Telegram.
|
|
- No <think> blocks or stage directions like *grins*. The reasoning is never spoken, and the asterisks are stripped so "grins" would be read out. Use [laughs] or [mischievously] instead.
|
|
- Keep it to one or two sentences unless asked for detail. Long answers are tiring to listen to, and every character is billed.
|
|
'';
|
|
};
|
|
|
|
# Peer values from a Proton WireGuard config generated for a P2P server
|
|
# with NAT-PMP on; its PrivateKey is protonvpn_wg_private_key in sops.
|
|
homelab.qbittorrentVpn = {
|
|
enable = true;
|
|
downloadDir = "/mnt/hdd_01/data/Downloads/Torrents";
|
|
privateKeyFile = config.sops.secrets.protonvpn_wg_private_key.path;
|
|
peerPublicKey = "nPCWC0rx9ZXEkzh7dxMUTO5/HUqDaLaD827Yp1sJCQU=";
|
|
endpoint = "103.69.224.2:51820"; # NL#490
|
|
};
|
|
|
|
networking.hostName = "terra";
|
|
|
|
home-manager.users.darman.homelab.desktop = {
|
|
monitors = [
|
|
{ output = "DP-2"; mode = "2560x1440@144"; position = "1920x0"; scale = 1; }
|
|
{ output = "HDMI-A-1"; mode = "1920x1080@60"; position = "0x360"; scale = 1; }
|
|
];
|
|
primaryOutput = "DP-2";
|
|
secondaryOutput = "HDMI-A-1";
|
|
fileManager = "hyprchrome-files";
|
|
# Not checked into this repo (binaries) — from the Wallhaven library on
|
|
# /mnt/hdd_01. hyprpaper has no "random" mode, so it's picked here.
|
|
wallpaper = "/mnt/hdd_01/data/Pictures/Wallhaven/wallhaven-mlwz78.png";
|
|
};
|
|
|
|
# Cast target for Jellyfin: plays files as-is in mpv, so 4K remuxes with
|
|
# DTS/DV skip the HLS remux a browser forces on jupiter's Celeron.
|
|
# Server login is a one-time dialog on first start (stored in cred.json).
|
|
home-manager.users.darman.services.jellyfin-mpv-shim = {
|
|
enable = true;
|
|
settings = {
|
|
player_name = "terra";
|
|
fullscreen = false;
|
|
# uosc replaces both; enable_osc would re-show mpv's own OSC on top.
|
|
enable_osc = false;
|
|
thumbnail_osc_builtin = false;
|
|
};
|
|
mpvConfig = {
|
|
vo = "gpu-next";
|
|
hwdec = "auto-safe";
|
|
# SDR panel: tone-map HDR10/DV down instead of passing PQ through.
|
|
target-colorspace-hint = false;
|
|
osc = false;
|
|
osd-bar = false;
|
|
osd-font = "DepartureMono Nerd Font";
|
|
};
|
|
};
|
|
# The shim runs libmpv with its own config dir, so scripts go there.
|
|
home-manager.users.darman.xdg.configFile = let uosc = pkgs.mpvScripts.uosc; in {
|
|
"jellyfin-mpv-shim/scripts/uosc".source = "${uosc}/share/mpv/scripts/uosc";
|
|
"jellyfin-mpv-shim/fonts/uosc_icons.otf".source = "${uosc}/share/fonts/uosc_icons.otf";
|
|
"jellyfin-mpv-shim/fonts/uosc_textures.ttf".source = "${uosc}/share/fonts/uosc_textures.ttf";
|
|
# Desktop palette (home/desktop/hyprland.nix colours).
|
|
"jellyfin-mpv-shim/script-opts/uosc.conf".text = ''
|
|
color=foreground=e8722a,foreground_text=0f1012,background=0f1012,background_text=eeeeee,curtain=0f1012,match=ff9d42
|
|
'';
|
|
};
|
|
|
|
hardware.cpu.amd.updateMicrocode = true;
|
|
|
|
# ---- GPU (Radeon RX 6800 XT / Navi 21) ----
|
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
|
|
# ---- Dev-data disks — NOT in disko, mounted read-write, never wiped ----
|
|
fileSystems."/mnt/hdd_01" = {
|
|
device = "/dev/disk/by-uuid/b8445126-ec6d-4f88-818a-d9e13031d9a4";
|
|
fsType = "ext4";
|
|
options = [ "nofail" ];
|
|
};
|
|
fileSystems."/mnt/ssd_01" = {
|
|
device = "/dev/disk/by-uuid/6ca18a9f-27bc-4e58-aea8-de43a0d0ed5d";
|
|
fsType = "ext4";
|
|
options = [ "nofail" ];
|
|
};
|
|
|
|
system.stateVersion = "26.05";
|
|
}
|