feat(titan): Zenbook laptop on a shared workstation profile
terra's desktop is split into profiles/workstation.nix (NixOS side) and home/desktop/ (home-manager side, moved from hosts/terra/home*), so titan, an ASUS Zenbook Pro Duo UX581 (Intel iGPU + RTX 2060 PRIME offload), gets the same Hyprland workstation. Per-host monitors, primary/secondary output and wallpaper are homelab.desktop.* options; the quickshell widgets read the outputs from QS_PRIMARY_OUTPUT/QS_SECONDARY_OUTPUT instead of hardcoding DP-2/HDMI-A-1. Folder icons come from a new HyprChrome-Folders icon theme. titan gets its own sops file and recipient. LibreChat is removed from terra along with its secrets declarations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,7 @@ keys:
|
||||
- &neptun age1hp72xyx2cnd05937e4eww95g5kdtn0wsf9j2nypw330pa69gfdxqn0lpkp
|
||||
- &terra age1rfcmu6zh40v4260l9hnf8ajs9vly0s06rx3ey76eu78dp9t7getqyhmkut
|
||||
- &mars age1eapjg6tdrr0fuvmgs3q3nlvnjkaxez298qynqqqxt0lpcv0lrsyq7ayxjk
|
||||
- &titan age1qm6ne4mrgwkj7eea5j3vn0qmtw4p5h4eu78vvahhfnd4pk04qausn3qgv2
|
||||
# mercury (rpi) uses a dedicated age key (SD image, no ssh-host-key delivery);
|
||||
# the private key is dropped on its boot partition after flashing.
|
||||
- &mercury age1cpty7zrgnn6l97upq00w5wa8zcvnkxkdt2jvhlj97jh83exure4slha43t
|
||||
@@ -29,6 +30,9 @@ creation_rules:
|
||||
- path_regex: secrets/terra\.yaml$
|
||||
key_groups:
|
||||
- age: [ *admin, *terra ]
|
||||
- path_regex: secrets/titan\.yaml$
|
||||
key_groups:
|
||||
- age: [ *admin, *titan ]
|
||||
- path_regex: secrets/mars\.yaml$
|
||||
key_groups:
|
||||
- age: [ *admin, *mars ]
|
||||
|
||||
@@ -4,7 +4,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
|
||||
Flake-based NixOS config for a homelab. Hosts: **jupiter** (ZimaBlade NAS, x86_64),
|
||||
**neptun** (netcup public reverse proxy + tailnet node, x86_64), **mercury** (Raspberry
|
||||
Pi 3B+ DNS/DHCP, aarch64). See `README.md` for the full install/deploy walkthrough.
|
||||
Pi 3B+ DNS/DHCP, aarch64), **terra** (desktop), **titan** (Zenbook Pro Duo laptop),
|
||||
**mars** (Hermes Agent + luna's apps). See `README.md` for the full install/deploy walkthrough.
|
||||
|
||||
## Layout
|
||||
|
||||
@@ -16,6 +17,8 @@ services/<cat>/*.nix # one reusable NixOS module per service, grouped by categ
|
||||
# ITS OWN firewall ports. services/containers.nix (podman
|
||||
# backend) stays at the top level, shared across categories.
|
||||
hosts/<h>/ # configuration.nix + disk-config.nix (disko) + hardware-configuration.nix + secrets.nix
|
||||
profiles/workstation.nix # Hyprland workstation shared by terra + titan (NixOS side)
|
||||
home/desktop/ # its home-manager side; per-host monitors via homelab.desktop.*
|
||||
secrets/<h>.yaml # sops-nix, age-encrypted per host
|
||||
scripts/deploy # config-agnostic deploy wrapper (all args mandatory)
|
||||
scripts/edit_secrets
|
||||
|
||||
@@ -8,7 +8,7 @@ A [Quickshell](https://quickshell.org/) configuration — a QML-based Wayland de
|
||||
|
||||
## Running / testing changes
|
||||
|
||||
**`~/.config/quickshell` is NOT a symlink to this repo.** `hosts/terra/home.nix`
|
||||
**`~/.config/quickshell` is NOT a symlink to this repo.** `home/desktop/default.nix`
|
||||
ships the tree with `xdg.configFile."quickshell"`, which COPIES it into the nix
|
||||
store, so the config directory is a read-only symlink into `/nix/store/...`.
|
||||
Editing a file here therefore changes nothing about the running shell: it is
|
||||
|
||||
@@ -28,7 +28,8 @@ Scope {
|
||||
|
||||
// Monitor to stage on. Falls back to the LAST connected screen when the
|
||||
// name matches nothing, so a single-monitor session still gets a stage.
|
||||
property string screenName: "HDMI-A-1"
|
||||
// Set per host in home/desktop/options.nix (secondaryOutput).
|
||||
property string screenName: Quickshell.env("QS_SECONDARY_OUTPUT") ?? ""
|
||||
property bool active: true
|
||||
|
||||
default property alias content: slot.data
|
||||
|
||||
@@ -40,7 +40,8 @@ Scope {
|
||||
// the name matches nothing, so the bar still appears on a single-monitor
|
||||
// session or after a cable swap (DebugWindow falls back to the last one
|
||||
// instead — it wants the secondary).
|
||||
property string screenName: "DP-2"
|
||||
// Set per host in home/desktop/options.nix (primaryOutput).
|
||||
property string screenName: Quickshell.env("QS_PRIMARY_OUTPUT") ?? ""
|
||||
|
||||
// Quickshell.screens is a QML list, not a JS array — no .find() on it.
|
||||
readonly property var targetScreen: {
|
||||
@@ -141,7 +142,7 @@ Scope {
|
||||
readonly property int barLayer: shell.scrimUp ? WlrLayer.Overlay : WlrLayer.Bottom
|
||||
readonly property int backdropLayer: shell.scrimUp ? WlrLayer.Top : WlrLayer.Background
|
||||
|
||||
// SUPER A — see hosts/terra/home/hyprland.nix.
|
||||
// SUPER A — see home/desktop/hyprland.nix.
|
||||
GlobalShortcut {
|
||||
name: "chrome"
|
||||
description: "Expand or collapse the hyprchrome bar"
|
||||
@@ -253,7 +254,7 @@ Scope {
|
||||
|
||||
// Polkit authentication agent. It registers for this logind session on
|
||||
// creation, so it replaces hyprpolkitagent rather than coexisting with it —
|
||||
// only one agent may hold a session (see hosts/terra/home/hyprland.nix).
|
||||
// only one agent may hold a session (see home/desktop/hyprland.nix).
|
||||
//
|
||||
// It lives here rather than beside the launchers in shell.qml because its
|
||||
// state is shared: `prompting` raises the scrim and freezes the density,
|
||||
|
||||
@@ -13,7 +13,7 @@ import qs.HyprChrome.Theme
|
||||
// nothing to call. Two consequences:
|
||||
//
|
||||
// * Only ONE agent may hold a session. hyprpolkitagent must not be running
|
||||
// (hosts/terra/home/hyprland.nix autostart), or registration fails and this
|
||||
// (home/desktop/hyprland.nix autostart), or registration fails and this
|
||||
// dialog silently never appears. `isRegistered` is the check.
|
||||
// * `path` is write-once — the binary refuses a later assignment with
|
||||
// "cannot change path after it has been set." Set it here or not at all.
|
||||
|
||||
@@ -40,7 +40,7 @@ Scope {
|
||||
// Host vitals HUD — toggle with SUPER CTRL V.
|
||||
Vitals {}
|
||||
|
||||
// Widget staging area, centered on the secondary monitor (HDMI-A-1),
|
||||
// Widget staging area, centered on the secondary monitor,
|
||||
// toggled with SUPER CTRL D. Swap the children below for whatever widget
|
||||
// is being worked on; they must carry their own size (see DebugWindow).
|
||||
// DebugWindow {
|
||||
|
||||
@@ -39,7 +39,7 @@ Scope {
|
||||
}
|
||||
|
||||
PanelWindow {
|
||||
screen: Quickshell.screens.find(s => s.name === "DP-2")
|
||||
screen: Quickshell.screens.find(s => s.name === Quickshell.env("QS_PRIMARY_OUTPUT"))
|
||||
visible: root.active
|
||||
|
||||
WlrLayershell.layer: WlrLayer.Overlay
|
||||
|
||||
@@ -135,6 +135,20 @@
|
||||
];
|
||||
};
|
||||
|
||||
# titan — ASUS Zenbook Pro Duo UX581 laptop; same Hyprland workstation
|
||||
# as terra (profiles/workstation.nix). See hosts/titan/*.
|
||||
titan = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
sops-nix.nixosModules.sops
|
||||
home-manager.nixosModules.home-manager
|
||||
inputs.nix-flatpak.nixosModules.nix-flatpak
|
||||
./hosts/titan/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
# mars — on-site x86_64 box: Hermes Agent, plus the LAN web apps luna
|
||||
# hosts herself (hosts/mars/luna-sites.nix). See hosts/mars/*.
|
||||
mars = nixpkgs.lib.nixosSystem {
|
||||
@@ -543,7 +557,7 @@
|
||||
|
||||
# `nix develop` — hot-reload loop for dotfiles/quickshell.
|
||||
#
|
||||
# hosts/terra/home.nix ships the shell as a store copy (`xdg.configFile`),
|
||||
# home/desktop/default.nix ships the shell as a store copy (`xdg.configFile`),
|
||||
# which only hot-reloads its own frozen files; pointing at the working
|
||||
# tree with `qs -p` restores edit-save-see without a rebuild.
|
||||
#
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
# Shared home-manager profile for darman, applied on every host via
|
||||
# common.nix. Host-specific extras (terra's desktop/dev tooling) layer on
|
||||
# common.nix. Workstation extras (terra, titan: home/desktop) layer on
|
||||
# top via their own home-manager.users.darman.imports entry, same pattern
|
||||
# used here — see hosts/terra/configuration.nix + hosts/terra/home.nix.
|
||||
# used here — see profiles/workstation.nix + home/desktop/default.nix.
|
||||
{ ... }:
|
||||
{
|
||||
home.stateVersion = "26.05";
|
||||
|
||||
@@ -45,10 +45,10 @@ let
|
||||
};
|
||||
in
|
||||
{
|
||||
# Desktop profile shared by terra and titan (profiles/workstation.nix).
|
||||
# home.stateVersion, programs.home-manager.enable, programs.zsh.enable all
|
||||
# come from home/common.nix (shared across every host) via
|
||||
# configuration.nix's home-manager.users.darman.imports.
|
||||
imports = [ ./home/hyprland.nix ./home/theme.nix ];
|
||||
# come from home/common.nix (every host).
|
||||
imports = [ ./options.nix ./hyprland.nix ./theme.nix ];
|
||||
|
||||
home.keyboard.layout = "de";
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{ lib, pkgs, config, inputs, ... }:
|
||||
{ lib, pkgs, config, osConfig, inputs, ... }:
|
||||
|
||||
let
|
||||
lua = lib.generators.mkLuaInline;
|
||||
cfg = config.homelab.desktop;
|
||||
|
||||
# Cursor theme+size live in home.pointerCursor (theme.nix) so the name is
|
||||
# in one place; hyprland.lua is what actually gets them into the graphical
|
||||
@@ -9,11 +10,6 @@ let
|
||||
cursorName = config.home.pointerCursor.name;
|
||||
cursorSize = toString config.home.pointerCursor.size;
|
||||
|
||||
# Wallpapers aren't checked into this repo (binaries) — pulled from the
|
||||
# Wallhaven library on /mnt/hdd_01. Picked once here since hyprpaper has
|
||||
# no built-in "random" mode.
|
||||
wallpaper = "/mnt/hdd_01/data/Pictures/Wallhaven/wallhaven-mlwz78.png";
|
||||
|
||||
# Dispatchers → the new hl.dsp.* API (signatures verified against hyprland
|
||||
# 0.55's src/config/lua/bindings/LuaBindingsDispatchers.cpp).
|
||||
dsp = {
|
||||
@@ -50,16 +46,13 @@ let
|
||||
];
|
||||
in
|
||||
{
|
||||
services.hyprpaper = {
|
||||
services.hyprpaper = lib.mkIf (cfg.wallpaper != null) {
|
||||
enable = true;
|
||||
settings = {
|
||||
ipc = "on";
|
||||
splash = false;
|
||||
preload = [ wallpaper ];
|
||||
wallpaper = [
|
||||
{ monitor = "DP-2"; path = wallpaper; }
|
||||
{ monitor = "HDMI-A-1"; path = wallpaper; }
|
||||
];
|
||||
preload = [ cfg.wallpaper ];
|
||||
wallpaper = map (m: { monitor = m.output; path = cfg.wallpaper; }) cfg.monitors;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -76,10 +69,7 @@ in
|
||||
bg_accent = { _var = "rgba(963c38ff)"; };
|
||||
|
||||
# ---- monitors ----
|
||||
monitor = [
|
||||
{ output = "DP-2"; mode = "2560x1440@144"; position = "1920x0"; scale = 1; }
|
||||
{ output = "HDMI-A-1"; mode = "1920x1080@60"; position = "0x360"; scale = 1; }
|
||||
];
|
||||
monitor = cfg.monitors;
|
||||
|
||||
# ---- variables (general/decoration/input/misc/...) ----
|
||||
config = {
|
||||
@@ -169,6 +159,9 @@ in
|
||||
{ _args = [ "XDG_SESSION_DESKTOP" "Hyprland" ]; }
|
||||
{ _args = [ "XDG_SESSION_TYPE" "wayland" ]; }
|
||||
{ _args = [ "QT_QPA_PLATFORMTHEME" "qt6ct" ]; }
|
||||
# Read by the quickshell bar/OSD/debug stage to pick their monitor.
|
||||
{ _args = [ "QS_PRIMARY_OUTPUT" cfg.primaryOutput ]; }
|
||||
{ _args = [ "QS_SECONDARY_OUTPUT" cfg.secondaryOutput ]; }
|
||||
];
|
||||
|
||||
# ---- keybinds (keybinds.conf) ----
|
||||
@@ -195,16 +188,18 @@ in
|
||||
# expand / collapse the hyprchrome bar as a whole
|
||||
(bind "SUPER + A" (dsp.global "quickshell:chrome"))
|
||||
|
||||
]
|
||||
# mute / unmute your mic for luna (services/desktop/luna-voice.nix);
|
||||
# never cuts off a reply she is already giving.
|
||||
# Runs the CLI rather than a quickshell GlobalShortcut so the mic can
|
||||
# still be switched off while the shell is reloading.
|
||||
++ lib.optional (osConfig.homelab.lunaVoice.enable or false)
|
||||
(bind "SUPER + V" (dsp.exec "luna-voice toggle"))
|
||||
|
||||
++ [
|
||||
(bind "SUPER + B" (dsp.exec "vivaldi"))
|
||||
(bind "SUPER + E" (dsp.exec "cosmic-files"))
|
||||
(bind "SUPER + SHIFT + G" (dsp.workspaceRef "game"))
|
||||
(bind "SUPER + S" (dsp.exec "grim -o DP-2 ~/screenshot.png"))
|
||||
(bind "SUPER + S" (dsp.exec "grim -o ${cfg.primaryOutput} ~/screenshot.png"))
|
||||
(bind "SUPER + SHIFT + S" (dsp.exec "grimblast copy area --freeze"))
|
||||
(bind "Print" (dsp.exec "rishot"))
|
||||
(bind "SUPER + L" (dsp.exec "hyprlock"))
|
||||
@@ -279,7 +274,7 @@ in
|
||||
|
||||
# ---- workspace rules (workspacerules.conf) ----
|
||||
workspace_rule = [
|
||||
{ workspace = "name:game"; monitor = "DP-2"; decorate = false; }
|
||||
{ workspace = "name:game"; monitor = cfg.primaryOutput; decorate = false; }
|
||||
{ workspace = "special:terminal"; on_created_empty = "alacritty"; gaps_out = 256; }
|
||||
{ workspace = "special:communications"; on_created_empty = "${config.home.homeDirectory}/.config/scripts/start-communications.sh"; gaps_out = 128; }
|
||||
{ workspace = "special:music"; on_created_empty = "com.blitzfc.qbz"; gaps_out = 128; }
|
||||
@@ -0,0 +1,26 @@
|
||||
{ lib, ... }:
|
||||
|
||||
# Per-host knobs for the shared desktop; set via
|
||||
# home-manager.users.darman.homelab.desktop in hosts/<h>/configuration.nix.
|
||||
{
|
||||
options.homelab.desktop = {
|
||||
monitors = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.attrs;
|
||||
description = "hl.monitor() tables; the greeter reuses them.";
|
||||
};
|
||||
primaryOutput = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Connector that gets the bar, OSDs, the game workspace and the greeter.";
|
||||
};
|
||||
secondaryOutput = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
description = "Connector for the debug widget stage; empty = last screen.";
|
||||
};
|
||||
wallpaper = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
description = "Image path for hyprpaper; null leaves hyprpaper off.";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -2,14 +2,19 @@
|
||||
|
||||
# Global Dracula theming (GTK + Qt)
|
||||
let
|
||||
azureGlassyDarkIcons = pkgs.callPackage ../../../pkgs/azure-glassy-dark-icons.nix { };
|
||||
amyDarkIcons = pkgs.callPackage ../../../pkgs/amy-dark-icons.nix { };
|
||||
slotBeautyDarkIcons = pkgs.callPackage ../../../pkgs/slot-beauty-dark-icons.nix { };
|
||||
hyprchromeCursors = pkgs.callPackage ../../../pkgs/hyprchrome-cursors.nix { };
|
||||
azureGlassyDarkIcons = pkgs.callPackage ../../pkgs/azure-glassy-dark-icons.nix { };
|
||||
amyDarkIcons = pkgs.callPackage ../../pkgs/amy-dark-icons.nix { };
|
||||
slotBeautyDarkIcons = pkgs.callPackage ../../pkgs/slot-beauty-dark-icons.nix { };
|
||||
hyprchromeCursors = pkgs.callPackage ../../pkgs/hyprchrome-cursors.nix { };
|
||||
|
||||
iconTheme = "Amy-Dark-Icons";
|
||||
iconThemePackage = amyDarkIcons;
|
||||
iconThemeFolder = "${iconThemePackage}/share/icons/${iconTheme}";
|
||||
# HyprChrome folders on top, Amy for everything else (Inherits=).
|
||||
# "HyprChrome-Folders-Solid" is the same set in the solid finish.
|
||||
baseIconTheme = "Amy-Dark-Icons";
|
||||
baseIconThemePackage = amyDarkIcons;
|
||||
iconTheme = "HyprChrome-Folders";
|
||||
iconThemePackage = pkgs.callPackage ../../pkgs/hyprchrome-folders.nix {
|
||||
baseTheme = baseIconTheme;
|
||||
};
|
||||
in
|
||||
{
|
||||
gtk = {
|
||||
@@ -42,7 +47,11 @@ in
|
||||
# Flatpak auto-exposes ~/.themes and ~/.icons read-only as the workaround.
|
||||
home.file.".themes/Dracula".source =
|
||||
"${pkgs.dracula-theme}/share/themes/Dracula";
|
||||
home.file.".icons/${iconTheme}".source = iconThemeFolder;
|
||||
home.file.".icons/${iconTheme}".source =
|
||||
"${iconThemePackage}/share/icons/${iconTheme}";
|
||||
home.file.".icons/${baseIconTheme}".source =
|
||||
"${baseIconThemePackage}/share/icons/${baseIconTheme}";
|
||||
home.packages = [ baseIconThemePackage ];
|
||||
|
||||
dconf.settings."org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
+11
-118
@@ -1,27 +1,14 @@
|
||||
# ---- TERRA ----
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
let
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
config = pkgs.config;
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./disk-config.nix
|
||||
./secrets.nix
|
||||
../../common.nix
|
||||
../../services/containers.nix
|
||||
../../services/vpn/tailscale.nix
|
||||
../../services/monitoring/node-exporter.nix
|
||||
../../services/desktop/desktop-hyprland.nix
|
||||
../../services/desktop/desktop-apps.nix
|
||||
../../services/desktop/claude-desktop.nix
|
||||
../../services/desktop/librechat.nix
|
||||
../../profiles/workstation.nix
|
||||
../../services/desktop/luna-voice.nix
|
||||
../../services/identity/pass-broker.nix
|
||||
../../services/dev/turtle-beach-re.nix
|
||||
inputs.turtle-beach-swarm-re.nixosModules.release
|
||||
inputs.tbctl.nixosModules.tbctl
|
||||
@@ -40,7 +27,7 @@ in
|
||||
};
|
||||
|
||||
# Talk to luna (Hermes Agent on mars) with SUPER+V — see
|
||||
# hosts/terra/home/hyprland.nix for the push-to-talk binds.
|
||||
# home/desktop/hyprland.nix for the push-to-talk binds.
|
||||
homelab.lunaVoice = {
|
||||
enable = true;
|
||||
hermesKeyFile = config.sops.secrets.hermes_api_server_key.path;
|
||||
@@ -84,100 +71,23 @@ in
|
||||
|
||||
networking.hostName = "terra";
|
||||
|
||||
homelab.greeter = {
|
||||
monitors = config.home-manager.users.darman.wayland.windowManager.hyprland.settings.monitor;
|
||||
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";
|
||||
defaultUser = "darman";
|
||||
keyboardLayout = "de";
|
||||
cursor = { inherit (config.home-manager.users.darman.home.pointerCursor) name size package; };
|
||||
secondaryOutput = "HDMI-A-1";
|
||||
# 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";
|
||||
};
|
||||
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
remotes = [{ name = "flathub"; location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; }];
|
||||
packages = [
|
||||
{ appId = "com.github.tchx84.Flatseal"; origin = "flathub"; }
|
||||
{ appId = "com.blitzfc.qbz"; origin = "flathub"; }
|
||||
{ appId = "com.discordapp.Discord"; origin = "flathub"; }
|
||||
{ appId = "org.telegram.desktop"; origin = "flathub"; }
|
||||
{ appId = "com.bambulab.BambuStudio"; origin = "flathub"; }
|
||||
{ appId = "md.obsidian.Obsidian"; origin = "flathub"; }
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = [ unstable.proton-pass-cli ];
|
||||
|
||||
# Proton Pass for scripts/deploy and Claude, one Telegram tap per use. Your
|
||||
# own pass-cli stays logged out here: the broker's session is the only one.
|
||||
homelab.passBroker = {
|
||||
enable = true;
|
||||
passCli = unstable.proton-pass-cli;
|
||||
patFile = config.sops.secrets.pass_broker_pat.path;
|
||||
telegram.tokenFile = config.sops.secrets.pass_broker_telegram_token.path;
|
||||
telegram.chatIdFile = config.sops.secrets.darman_telegram_user_id.path;
|
||||
};
|
||||
|
||||
# run0 waits on systemd over D-Bus, whose 25s default call timeout runs out
|
||||
# while the polkit dialog is still open (slow typing, a vault lookup).
|
||||
# Scoped to run0 so a hung systemctl doesn't also wait 5min.
|
||||
programs.zsh.shellAliases.run0 = "SYSTEMD_BUS_TIMEOUT=5min run0";
|
||||
|
||||
# ---- nix-ld: lets generic dynamically-linked Linux binaries run as-is —
|
||||
# needed for editor extensions (Zed/VSCode LSPs, debuggers, etc.) that
|
||||
# download prebuilt binaries not built for NixOS. See
|
||||
# https://nix.dev/permalink/stub-ld ----
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
# JetBrains IDEs installed via Toolbox bundle a JBR that aborts with
|
||||
# `libX11.so.6: cannot open shared object file` under the default (X11-less)
|
||||
# nix-ld set. Additive — merges with the module's own base list (zlib etc).
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
freetype
|
||||
fontconfig
|
||||
libGL
|
||||
libxkbcommon
|
||||
wayland
|
||||
libsecret
|
||||
libx11
|
||||
libxext
|
||||
libxi
|
||||
libxrender
|
||||
libxtst
|
||||
libxcursor
|
||||
libxrandr
|
||||
libxinerama
|
||||
libxcb
|
||||
icu
|
||||
];
|
||||
|
||||
# NixOS only ships /bin/sh; envfs serves /bin and /usr/bin from PATH so
|
||||
# third-party scripts hardcoding `#!/bin/bash` (e.g. JetBrains Toolbox's
|
||||
# generated launchers) still resolve.
|
||||
services.envfs.enable = true;
|
||||
|
||||
# ---- home-manager (user-level config for darman) ----
|
||||
# Base settings + shared zsh baseline live in common.nix + home/common.nix
|
||||
# (every host); this layers terra's desktop profile on top (imports merge).
|
||||
home-manager.extraSpecialArgs = { inherit unstable inputs; };
|
||||
home-manager.users.darman.imports = [ ./home.nix ];
|
||||
|
||||
# ---- Boot (UEFI) ----
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
|
||||
# Lets `nix build` target mercury (aarch64) from here — see CLAUDE.md's
|
||||
# aarch64 gotcha.
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
|
||||
# ---- GPU (Radeon RX 6800 XT / Navi 21) ----
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
|
||||
# /dev/dri/renderD128 is root:render 0660 — host user needs render group for
|
||||
# rootless podman GPU containers (Vulkan whisper.cpp/llama.cpp).
|
||||
users.users.darman.extraGroups = [ "render" "video" ];
|
||||
|
||||
# ---- 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";
|
||||
@@ -190,22 +100,5 @@ in
|
||||
options = [ "nofail" ];
|
||||
};
|
||||
|
||||
# jupiter's samba share (services/network/samba.nix) — mounted on demand so
|
||||
# terra doesn't stall boot/login when jupiter is off or unreachable.
|
||||
fileSystems."/mnt/jupiter" = {
|
||||
device = "//jupiter/data";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"credentials=${config.sops.templates."jupiter-smb.credentials".path}"
|
||||
"uid=1000"
|
||||
"gid=100"
|
||||
"nofail"
|
||||
"x-systemd.automount"
|
||||
"x-systemd.idle-timeout=60"
|
||||
"x-systemd.mount-timeout=10s"
|
||||
"_netdev"
|
||||
];
|
||||
};
|
||||
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
|
||||
+1
-26
@@ -4,6 +4,7 @@
|
||||
# decrypted with terra's own SSH host key (recipient in ../../.sops.yaml).
|
||||
# The host key is pre-generated on the laptop and shipped at install
|
||||
# (nixos-anywhere --extra-files -> /etc/ssh/ssh_host_ed25519_key).
|
||||
# samba + pass-broker secrets are declared in profiles/workstation.nix.
|
||||
{
|
||||
sops.defaultSopsFile = ../../secrets/terra.yaml;
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
@@ -13,20 +14,6 @@
|
||||
sops.secrets.darman_password.neededForUsers = true;
|
||||
users.users.darman.hashedPasswordFile = config.sops.secrets.darman_password.path;
|
||||
|
||||
# Credentials file for the //jupiter/data cifs mount (see configuration.nix).
|
||||
# samba_password mirrors jupiter's own samba_password secret (services/network/samba.nix) —
|
||||
# same value, just also encrypted to terra so it can authenticate as the same smb user.
|
||||
sops.secrets.samba_password = { };
|
||||
sops.templates."jupiter-smb.credentials".content = ''
|
||||
username=darman
|
||||
password=${config.sops.placeholder.samba_password}
|
||||
'';
|
||||
|
||||
# LibreChat's CREDS_KEY/IV encrypt stored user credentials (linked 3rd-party
|
||||
# API keys etc) at rest in mongo; JWT_SECRET/JWT_REFRESH_SECRET sign session
|
||||
# tokens. All four are random, generated once with `sops --set` (see
|
||||
# CLAUDE.md) — losing/rotating them just invalidates existing sessions and
|
||||
# any saved per-user API keys, nothing else depends on their value.
|
||||
# luna-voiced (services/desktop/luna-voice.nix) runs as a USER service, so
|
||||
# these cannot stay root:root 0400 — a user manager cannot read them and
|
||||
# LoadCredential does not bridge that gap either. Hence owner, not mode.
|
||||
@@ -38,16 +25,4 @@
|
||||
# files; see CLAUDE.md.
|
||||
sops.secrets.hermes_api_server_key.owner = "darman";
|
||||
sops.secrets.elevenlabs_api_key.owner = "darman";
|
||||
|
||||
# pass-broker (services/identity/pass-broker.nix): the agent PAT and its
|
||||
# dedicated Telegram bot. Owner pass-broker, so darman cannot read them.
|
||||
sops.secrets.pass_broker_pat.owner = "pass-broker";
|
||||
sops.secrets.pass_broker_telegram_token.owner = "pass-broker";
|
||||
# Not broker-specific; a second reader needs a sops.templates copy, not a new owner.
|
||||
sops.secrets.darman_telegram_user_id.owner = "pass-broker";
|
||||
|
||||
sops.secrets.librechat_creds_key = { };
|
||||
sops.secrets.librechat_creds_iv = { };
|
||||
sops.secrets.librechat_jwt_secret = { };
|
||||
sops.secrets.librechat_jwt_refresh_secret = { };
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
# ---- TITAN ----
|
||||
# ASUS Zenbook Pro Duo UX581LV: i7/i9 10th gen (UHD 630) + RTX 2060,
|
||||
# 4K OLED + ScreenPad Plus. Same workstation as terra (profiles/workstation.nix).
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./disk-config.nix
|
||||
./secrets.nix
|
||||
../../common.nix
|
||||
../../profiles/workstation.nix
|
||||
];
|
||||
|
||||
networking.hostName = "titan";
|
||||
|
||||
# Connector names are a first guess; check `hyprctl monitors` after the
|
||||
# first boot. The catch-all rule keeps any unlisted output usable.
|
||||
home-manager.users.darman.homelab.desktop = {
|
||||
monitors = [
|
||||
{ output = "eDP-1"; mode = "3840x2160@60"; position = "0x0"; scale = 2; }
|
||||
{ output = ""; mode = "preferred"; position = "auto"; scale = "auto"; }
|
||||
];
|
||||
primaryOutput = "eDP-1";
|
||||
};
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
services.thermald.enable = true;
|
||||
|
||||
# ---- GPU: Intel iGPU drives the panels, RTX 2060 on demand ----
|
||||
# Run something on the dGPU with `nvidia-offload <cmd>`.
|
||||
hardware.graphics.extraPackages = [ pkgs.intel-media-driver ];
|
||||
services.xserver.videoDrivers = [ "modesetting" "nvidia" ];
|
||||
hardware.nvidia = {
|
||||
open = true; # Turing is supported by the open module
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = true; # dGPU powers off when idle
|
||||
prime = {
|
||||
offload.enable = true;
|
||||
offload.enableOffloadCmd = true;
|
||||
# Usual UX581 values; confirm with `lspci | grep -E 'VGA|3D'`.
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
|
||||
# ---- laptop ----
|
||||
hardware.bluetooth.enable = true;
|
||||
services.power-profiles-daemon.enable = true;
|
||||
services.upower.enable = true;
|
||||
zramSwap.enable = true;
|
||||
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{ ... }:
|
||||
|
||||
# Declarative OS-disk layout (disko), same as terra: GPT, ESP + btrfs root,
|
||||
# whole internal NVMe, NixOS only. See hosts/terra/disk-config.nix for why
|
||||
# each partition wipes its old signature first.
|
||||
#
|
||||
# ⚠️ This disk is WIPED on install. `device` is a deliberate non-path until
|
||||
# the real id is filled in from the laptop (`ls -l /dev/disk/by-id/`), so
|
||||
# an install fails before touching anything rather than guessing a disk.
|
||||
{
|
||||
disko.devices.disk.os = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/FILL-ME-IN-titan-nvme";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
preCreateHook = ''wipefs --all --force "$device"'';
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
mountpoint = "/";
|
||||
preCreateHook = ''wipefs --all --force "$device"'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
# PLACEHOLDER — replaced on install.
|
||||
#
|
||||
# disko (disk-config.nix) owns "/" and "/boot", so this file only carries
|
||||
# kernel modules + platform. nixos-anywhere regenerates it via:
|
||||
# nixos-generate-config --no-filesystems
|
||||
# Fallback for the UX581 (10th-gen Intel, NVMe): `vmd` in case the firmware
|
||||
# has Intel VMD/RST on, which hides the NVMe from stage 1 without it.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# NO fileSystems here — disko defines "/" and "/boot".
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{ config, ... }:
|
||||
|
||||
# sops-nix wiring for titan (laptop). Encrypted values in ../../secrets/titan.yaml,
|
||||
# decrypted with titan's own SSH host key (recipient in ../../.sops.yaml).
|
||||
# samba + pass-broker secrets are declared in profiles/workstation.nix.
|
||||
# pass_broker_telegram_token must be titan's OWN bot: getUpdates has one
|
||||
# consumer, so sharing terra's would split approval taps between the two.
|
||||
{
|
||||
sops.defaultSopsFile = ../../secrets/titan.yaml;
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
|
||||
sops.secrets.tailscale_authkey = { };
|
||||
|
||||
sops.secrets.darman_password.neededForUsers = true;
|
||||
users.users.darman.hashedPasswordFile = config.sops.secrets.darman_password.path;
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
{ lib, stdenvNoCC, gtk3, baseTheme }:
|
||||
|
||||
# HyprChrome folders, drawn as the first artboard of the "HyprChrome Folders"
|
||||
# design canvas (claude.ai/artifact/W2jmmhXLUzt2isUpGEraB6): 20 folder icons on
|
||||
# a 32px grid in its two finishes, each shipped as its own theme. Only folders
|
||||
# are drawn; everything else comes from baseTheme via Inherits=.
|
||||
let
|
||||
accent = "#e8722a";
|
||||
accentHot = "#ff6b4a";
|
||||
|
||||
# LIT: accent tab over a selection-grey hull, accent emblems.
|
||||
# SOLID: accent hull, surface-ink emblems.
|
||||
themes = {
|
||||
"HyprChrome-Folders" = acc: {
|
||||
inherit acc;
|
||||
tab = acc; hull = "#1a1c1f"; seam = ''stroke="#dedede" stroke-opacity="0.12"'';
|
||||
ink = acc; sub = ''stroke="#858585"''; hole = "#1a1c1f";
|
||||
};
|
||||
"HyprChrome-Folders-Solid" = acc: {
|
||||
inherit acc;
|
||||
tab = "#292c30"; hull = acc; seam = ''stroke="#0a0a0a" stroke-opacity="0.35"'';
|
||||
ink = "#0a0a0a"; sub = ''stroke="#0a0a0a" stroke-opacity="0.5"''; hole = acc;
|
||||
};
|
||||
};
|
||||
|
||||
bases = {
|
||||
closed = f: ''
|
||||
<path d="M3 5 H11.5 L13.5 7 H21 L23 9 V11 H3 Z" fill="${f.tab}" stroke="#0a0a0a" stroke-width="0.8"/>
|
||||
<path d="M3 10 H25 L29 14 V27 H7 L3 23 Z" fill="${f.hull}" stroke="#0a0a0a" stroke-width="0.8"/>
|
||||
<path d="M3.6 13 H27.4" ${f.seam} stroke-width="0.8"/>
|
||||
<path d="M25.9 9.1 H29.9 V13.1 Z M2.1 23.9 V27.9 H6.1 Z" fill="${f.acc}"/>
|
||||
'';
|
||||
open = f: ''
|
||||
<path d="M3 9 H25 L29 13 V27 H7 L3 23 Z" fill="#292c30" stroke="#0a0a0a" stroke-width="0.8"/>
|
||||
<path d="M3 5 H11.5 L13.5 7 H21 L23 9 V11 H3 Z" fill="${f.tab}" stroke="#0a0a0a" stroke-width="0.8"/>
|
||||
<path d="M5.25 8.5 H20.5 V24 H5.25 Z" fill="#dedede" stroke="#0a0a0a" stroke-width="0.6"/>
|
||||
<path d="M7.75 10.6 H16.5" stroke="#858585" stroke-width="0.9"/>
|
||||
<path d="M3 13 H25 L29 17 V27 H7 L3 23 Z" fill="${f.hull}" stroke="#0a0a0a" stroke-width="0.8"/>
|
||||
<path d="M3.6 16 H27.4" ${f.seam} stroke-width="0.8"/>
|
||||
<path d="M25.85 8.15 H29.85 V12.15 Z M2.15 23.85 V27.85 H6.15 Z" fill="${f.acc}"/>
|
||||
'';
|
||||
};
|
||||
|
||||
# the canvas's k / kf / sb / hl classes
|
||||
paint = f: {
|
||||
k = ''fill="none" stroke="${f.ink}"'';
|
||||
kf = ''fill="${f.ink}"'';
|
||||
sb = ''fill="none" ${f.sub}'';
|
||||
hl = ''fill="${f.hole}"'';
|
||||
};
|
||||
|
||||
can = p: ''
|
||||
<path ${p.k} d="M11.5 16.3 H20.5" stroke-width="1.4"/>
|
||||
<path ${p.k} d="M14.5 16 V15 H17.5 V16" stroke-width="1"/>
|
||||
<path ${p.k} d="M12.8 17.8 H19.2 V24.5 H13.8 L12.8 23.5 Z" stroke-width="1.2"/>
|
||||
'';
|
||||
|
||||
emblems = {
|
||||
none = p: "";
|
||||
homelab = p: ''
|
||||
<path ${p.k} d="M11.5 15 H20.5 V24.5 H11.5 Z" stroke-width="1.2"/>
|
||||
<path ${p.k} d="M11.5 18.2 H20.5 M11.5 21.4 H20.5" stroke-width="1"/>
|
||||
<rect ${p.kf} x="12.8" y="16" width="1.6" height="1.3"/>
|
||||
<rect ${p.kf} x="12.8" y="19.2" width="1.6" height="1.3"/>
|
||||
<rect ${p.kf} x="12.8" y="22.4" width="1.6" height="1.3"/>
|
||||
<path ${p.sb} d="M15.6 16.6 H19.2 M15.6 19.8 H19.2 M15.6 23 H17.4" stroke-width="0.9"/>
|
||||
'';
|
||||
home = p: ''
|
||||
<path ${p.k} d="M11.5 19.5 L16 15 L20.5 19.5 M13 18 V24 H19 V18" stroke-width="1.3"/>
|
||||
<rect ${p.kf} x="15.1" y="21" width="1.8" height="3"/>
|
||||
'';
|
||||
desktop = p: ''
|
||||
<path ${p.k} d="M11.5 15.5 H20.5 V21.5 H11.5 Z" stroke-width="1.2"/>
|
||||
<path ${p.k} d="M16 21.5 V23.5 M13.5 24 H18.5" stroke-width="1.2"/>
|
||||
<path ${p.sb} d="M13 17.3 H16.5" stroke-width="0.9"/>
|
||||
<rect ${p.kf} x="17.6" y="18.4" width="1.6" height="1.6"/>
|
||||
'';
|
||||
documents = p: ''
|
||||
<path ${p.k} d="M12.5 15 H18 L20 17 V24.5 H12.5 Z" stroke-width="1.2"/>
|
||||
<path ${p.sb} d="M14.3 19 H18.2 M14.3 21 H18.2 M14.3 23 H16.5" stroke-width="0.9"/>
|
||||
'';
|
||||
download = p: ''
|
||||
<path ${p.k} d="M16 15 V21.5 M13 18.8 L16 21.8 L19 18.8" stroke-width="1.4"/>
|
||||
<rect ${p.kf} x="12.5" y="23" width="7" height="1.4"/>
|
||||
'';
|
||||
music = p: ''
|
||||
<path ${p.k} d="M14.3 17.2 L19.3 15.7 V22 M14.3 17.2 V23.5" stroke-width="1.2"/>
|
||||
<rect ${p.kf} x="11.9" y="22.5" width="2.8" height="2"/>
|
||||
<rect ${p.kf} x="16.9" y="21" width="2.8" height="2"/>
|
||||
'';
|
||||
pictures = p: ''
|
||||
<path ${p.k} d="M11.5 15.5 H20.5 V23.5 H11.5 Z" stroke-width="1.2"/>
|
||||
<path ${p.sb} d="M12.3 22.7 L15 19.5 L17 21.5 L18.2 20.3 L19.7 21.8" stroke-width="1"/>
|
||||
<rect ${p.kf} x="17.6" y="17" width="1.6" height="1.6"/>
|
||||
'';
|
||||
videos = p: ''
|
||||
<path ${p.k} d="M11.5 15.5 H20.5 V23.5 H11.5 Z" stroke-width="1.2"/>
|
||||
<path ${p.kf} d="M14.6 17.3 V21.7 L18.4 19.5 Z"/>
|
||||
<path ${p.sb} d="M12.6 17 V22 M19.4 17 V22" stroke-width="0.8" stroke-dasharray="1 1"/>
|
||||
'';
|
||||
templates = p: ''
|
||||
<path ${p.k} d="M12.5 15 H18 L20 17 V24.5 H12.5 Z" stroke-width="1.1" stroke-dasharray="1.4 1"/>
|
||||
<rect ${p.kf} x="14.3" y="18.6" width="3.6" height="1.3"/>
|
||||
<path ${p.sb} d="M14.3 21.6 H18.2" stroke-width="0.9"/>
|
||||
'';
|
||||
publicshare = p: ''
|
||||
<path ${p.sb} d="M13.2 19.7 L19 16.2 M13.2 19.7 L19 23.2" stroke-width="1"/>
|
||||
<rect ${p.kf} x="12" y="18.5" width="2.4" height="2.4"/>
|
||||
<rect ${p.kf} x="17.8" y="15" width="2.4" height="2.4"/>
|
||||
<rect ${p.kf} x="17.8" y="22" width="2.4" height="2.4"/>
|
||||
'';
|
||||
git = p: ''
|
||||
<path ${p.k} d="M13 16 V23.6 M19 16 V17.5 L13.5 23" stroke-width="1.3"/>
|
||||
<rect ${p.kf} x="11.8" y="14.8" width="2.4" height="2.4"/>
|
||||
<rect ${p.kf} x="11.8" y="22.6" width="2.4" height="2.4"/>
|
||||
<rect ${p.kf} x="17.8" y="14.8" width="2.4" height="2.4"/>
|
||||
'';
|
||||
projects = p: ''
|
||||
<path ${p.k} d="M12 16.5 L15 19.5 L12 22.5" stroke-width="1.5"/>
|
||||
<rect ${p.kf} x="16" y="21.8" width="4.5" height="1.5"/>
|
||||
'';
|
||||
remote = p: ''
|
||||
<path ${p.sb} d="M11.5 20.5 H14.5 V23.5 H11.5 Z M17.5 15.5 H20.5 V18.5 H17.5 Z" stroke-width="1"/>
|
||||
<path ${p.k} d="M14.5 22 H15.5 L19 18.5" stroke-width="1.3"/>
|
||||
<rect ${p.kf} x="12.4" y="21.4" width="1.2" height="1.2"/>
|
||||
<rect ${p.kf} x="18.4" y="16.4" width="1.2" height="1.2"/>
|
||||
'';
|
||||
saved-search = p: ''
|
||||
<path ${p.k} d="M14 15 H17 L18.5 16.5 V19.5 L17 21 H14 L12.5 19.5 V16.5 Z" stroke-width="1.3"/>
|
||||
<path ${p.k} d="M18 20.5 L20.5 23" stroke-width="2"/>
|
||||
'';
|
||||
locked = p: ''
|
||||
<path ${p.k} d="M14 19 V16.6 L15 15.6 H17 L18 16.6 V19" stroke-width="1.3"/>
|
||||
<rect ${p.kf} x="12.5" y="19" width="7" height="5.5"/>
|
||||
<rect ${p.hl} x="15.5" y="20.8" width="1" height="2"/>
|
||||
'';
|
||||
important = p: ''
|
||||
<path ${p.k} d="M16 15 L20.5 23.5 H11.5 Z" stroke-width="1.3" stroke-linejoin="miter"/>
|
||||
<rect ${p.kf} x="15.4" y="18.2" width="1.2" height="2.8"/>
|
||||
<rect ${p.kf} x="15.4" y="21.7" width="1.2" height="1.1"/>
|
||||
'';
|
||||
trash = p: can p + ''
|
||||
<path ${p.sb} d="M15 19.3 V23 M17 19.3 V23" stroke-width="0.9"/>
|
||||
'';
|
||||
trash-full = p: can p + ''
|
||||
<rect ${p.kf} x="14.2" y="19.2" width="1.4" height="3.9"/>
|
||||
<rect ${p.kf} x="16.4" y="19.2" width="1.4" height="3.9"/>
|
||||
'';
|
||||
};
|
||||
|
||||
# aliases: the other names apps (and baseTheme) use for the same folder, so
|
||||
# those don't fall through to baseTheme's own drawing.
|
||||
icons = {
|
||||
folder = { emblem = "none"; aliases = [ "inode-directory" "gtk-directory" "gnome-fs-directory" "gnome-folder" "stock_folder" ]; };
|
||||
folder-open = { base = "open"; emblem = "none"; aliases = [ "folder-drag-accept" "folder-visiting" "gnome-fs-directory-accept" ]; };
|
||||
folder-homelab = { emblem = "homelab"; };
|
||||
user-home = { emblem = "home"; aliases = [ "folder-home" "folder_home" "gnome-fs-home" ]; };
|
||||
user-desktop = { emblem = "desktop"; aliases = [ "folder-desktop" "gnome-fs-desktop" ]; };
|
||||
folder-documents = { emblem = "documents"; };
|
||||
folder-download = { emblem = "download"; aliases = [ "folder-downloads" ]; };
|
||||
folder-music = { emblem = "music"; };
|
||||
folder-pictures = { emblem = "pictures"; aliases = [ "folder-images" "folder-image" "folder-picture" ]; };
|
||||
folder-videos = { emblem = "videos"; aliases = [ "folder-video" ]; };
|
||||
folder-templates = { emblem = "templates"; };
|
||||
folder-publicshare = { emblem = "publicshare"; aliases = [ "folder-public" ]; };
|
||||
folder-git = { emblem = "git"; };
|
||||
folder-projects = { emblem = "projects"; aliases = [ "folder-development" ]; };
|
||||
folder-remote = { emblem = "remote"; aliases = [ "folder-network" ]; };
|
||||
folder-saved-search = { emblem = "saved-search"; };
|
||||
folder-locked = { emblem = "locked"; aliases = [ "folder-encrypted" ]; };
|
||||
folder-important = { emblem = "important"; hot = true; };
|
||||
user-trash = { emblem = "trash"; aliases = [ "trash-empty" "gnome-fs-trash-empty" ]; };
|
||||
user-trash-full = { emblem = "trash-full"; aliases = [ "gnome-fs-trash-full" ]; };
|
||||
};
|
||||
|
||||
svg = finish: name: { emblem, base ? "closed", hot ? false, ... }:
|
||||
let f = finish (if hot then accentHot else accent); in
|
||||
builtins.toFile "${name}.svg" ''
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
||||
${bases.${base} f}${emblems.${emblem} (paint f)}</svg>
|
||||
'';
|
||||
|
||||
buildTheme = theme: finish: ''
|
||||
dir="$out/share/icons/${theme}"
|
||||
mkdir -p "$dir/places/scalable"
|
||||
cat > "$dir/index.theme" <<EOF
|
||||
[Icon Theme]
|
||||
Name=${theme}
|
||||
Comment=HyprChrome folders for terra, over ${baseTheme}
|
||||
Inherits=${baseTheme},hicolor
|
||||
Directories=places/scalable
|
||||
|
||||
[places/scalable]
|
||||
Context=Places
|
||||
Size=32
|
||||
MinSize=16
|
||||
MaxSize=512
|
||||
Type=Scalable
|
||||
EOF
|
||||
|
||||
${lib.concatStrings (lib.mapAttrsToList (name: icon: ''
|
||||
cp ${svg finish name icon} "$dir/places/scalable/${name}.svg"
|
||||
${lib.concatMapStrings (a: "ln -s ${name}.svg \"$dir/places/scalable/${a}.svg\"\n") (icon.aliases or [ ])}
|
||||
'') icons)}
|
||||
gtk-update-icon-cache --force "$dir"
|
||||
'';
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "hyprchrome-folders";
|
||||
version = "0.1";
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ gtk3 ];
|
||||
|
||||
# gtk3's setup hook strips icon-theme.cache from $out by default
|
||||
dontDropIconThemeCache = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
${lib.concatStrings (lib.mapAttrsToList buildTheme themes)}
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "HyprChrome folder icon themes (lit + solid finishes)";
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
|
||||
# Hyprland workstation shared by terra (desktop) and titan (laptop):
|
||||
# everything that isn't tied to one machine's hardware or desk. Hosts set
|
||||
# home-manager.users.darman.homelab.desktop (home/desktop/options.nix) for
|
||||
# their monitors.
|
||||
let
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
config = pkgs.config;
|
||||
};
|
||||
hm = config.home-manager.users.darman;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../services/containers.nix
|
||||
../services/vpn/tailscale.nix
|
||||
../services/monitoring/node-exporter.nix
|
||||
../services/desktop/desktop-hyprland.nix
|
||||
../services/desktop/desktop-apps.nix
|
||||
../services/desktop/claude-desktop.nix
|
||||
../services/identity/pass-broker.nix
|
||||
];
|
||||
|
||||
homelab.greeter = {
|
||||
monitors = hm.wayland.windowManager.hyprland.settings.monitor;
|
||||
primaryOutput = hm.homelab.desktop.primaryOutput;
|
||||
defaultUser = "darman";
|
||||
keyboardLayout = "de";
|
||||
cursor = { inherit (hm.home.pointerCursor) name size package; };
|
||||
};
|
||||
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
remotes = [{ name = "flathub"; location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; }];
|
||||
packages = [
|
||||
{ appId = "com.github.tchx84.Flatseal"; origin = "flathub"; }
|
||||
{ appId = "com.blitzfc.qbz"; origin = "flathub"; }
|
||||
{ appId = "com.discordapp.Discord"; origin = "flathub"; }
|
||||
{ appId = "org.telegram.desktop"; origin = "flathub"; }
|
||||
{ appId = "com.bambulab.BambuStudio"; origin = "flathub"; }
|
||||
{ appId = "md.obsidian.Obsidian"; origin = "flathub"; }
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = [ unstable.proton-pass-cli ];
|
||||
|
||||
# Proton Pass for scripts/deploy and Claude, one Telegram tap per use. Your
|
||||
# own pass-cli stays logged out here: the broker's session is the only one.
|
||||
homelab.passBroker = {
|
||||
enable = true;
|
||||
passCli = unstable.proton-pass-cli;
|
||||
patFile = config.sops.secrets.pass_broker_pat.path;
|
||||
telegram.tokenFile = config.sops.secrets.pass_broker_telegram_token.path;
|
||||
telegram.chatIdFile = config.sops.secrets.darman_telegram_user_id.path;
|
||||
};
|
||||
|
||||
# pass-broker (services/identity/pass-broker.nix): the agent PAT and its
|
||||
# dedicated Telegram bot. Owner pass-broker, so darman cannot read them.
|
||||
sops.secrets.pass_broker_pat.owner = "pass-broker";
|
||||
sops.secrets.pass_broker_telegram_token.owner = "pass-broker";
|
||||
# Not broker-specific; a second reader needs a sops.templates copy, not a new owner.
|
||||
sops.secrets.darman_telegram_user_id.owner = "pass-broker";
|
||||
|
||||
# run0 waits on systemd over D-Bus, whose 25s default call timeout runs out
|
||||
# while the polkit dialog is still open (slow typing, a vault lookup).
|
||||
# Scoped to run0 so a hung systemctl doesn't also wait 5min.
|
||||
programs.zsh.shellAliases.run0 = "SYSTEMD_BUS_TIMEOUT=5min run0";
|
||||
|
||||
# ---- nix-ld: lets generic dynamically-linked Linux binaries run as-is —
|
||||
# needed for editor extensions (Zed/VSCode LSPs, debuggers, etc.) that
|
||||
# download prebuilt binaries not built for NixOS. See
|
||||
# https://nix.dev/permalink/stub-ld ----
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
# JetBrains IDEs installed via Toolbox bundle a JBR that aborts with
|
||||
# `libX11.so.6: cannot open shared object file` under the default (X11-less)
|
||||
# nix-ld set. Additive — merges with the module's own base list (zlib etc).
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
freetype
|
||||
fontconfig
|
||||
libGL
|
||||
libxkbcommon
|
||||
wayland
|
||||
libsecret
|
||||
libx11
|
||||
libxext
|
||||
libxi
|
||||
libxrender
|
||||
libxtst
|
||||
libxcursor
|
||||
libxrandr
|
||||
libxinerama
|
||||
libxcb
|
||||
icu
|
||||
];
|
||||
|
||||
# NixOS only ships /bin/sh; envfs serves /bin and /usr/bin from PATH so
|
||||
# third-party scripts hardcoding `#!/bin/bash` (e.g. JetBrains Toolbox's
|
||||
# generated launchers) still resolve.
|
||||
services.envfs.enable = true;
|
||||
|
||||
# ---- home-manager (user-level config for darman) ----
|
||||
# Base settings + shared zsh baseline live in common.nix + home/common.nix
|
||||
# (every host); this layers the desktop profile on top (imports merge).
|
||||
home-manager.extraSpecialArgs = { inherit unstable inputs; };
|
||||
home-manager.users.darman.imports = [ ../home/desktop ];
|
||||
|
||||
# ---- Boot (UEFI) ----
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Lets `nix build` target mercury (aarch64) from here — see CLAUDE.md's
|
||||
# aarch64 gotcha.
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# /dev/dri/renderD128 is root:render 0660 — host user needs render group for
|
||||
# rootless podman GPU containers (Vulkan whisper.cpp/llama.cpp).
|
||||
users.users.darman.extraGroups = [ "render" "video" ];
|
||||
|
||||
# jupiter's samba share (services/network/samba.nix) — mounted on demand so
|
||||
# boot/login don't stall when jupiter is off or unreachable.
|
||||
fileSystems."/mnt/jupiter" = {
|
||||
device = "//jupiter/data";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"credentials=${config.sops.templates."jupiter-smb.credentials".path}"
|
||||
"uid=1000"
|
||||
"gid=100"
|
||||
"nofail"
|
||||
"x-systemd.automount"
|
||||
"x-systemd.idle-timeout=60"
|
||||
"x-systemd.mount-timeout=10s"
|
||||
"_netdev"
|
||||
];
|
||||
};
|
||||
|
||||
# samba_password mirrors jupiter's own samba_password secret (services/network/samba.nix) —
|
||||
# same value, just also encrypted to each workstation so it can authenticate as the same smb user.
|
||||
sops.secrets.samba_password = { };
|
||||
sops.templates."jupiter-smb.credentials".content = ''
|
||||
username=darman
|
||||
password=${config.sops.placeholder.samba_password}
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
tailscale_authkey: ENC[AES256_GCM,data:IMPUuTAo1T/suiEKm9FhNTPaJF1FjdIH5dZw6vzjjzH/eqoKbJ0LyWZ5psGLhJb+5b1T6y9p+OgLVD5g4KaSiW05tIgiMXE7DKF+eHZq3r32guKOymTB9g==,iv:YLODeA1yD+/xyXNygwrvDOG9C+QpO6yTD/JyOsVV64g=,tag:94XPWgNuHeLE3vaN2IvinQ==,type:str]
|
||||
darman_password: ENC[AES256_GCM,data:GI2aBID+NUkKsmWY6+4igchMVKy5U3CK5kxST15aoE9yd7z01Xf2TZwA73MZnH/PY2nqmPQdBexdPRusGXrU3YgRF4tqkngblMA+NVqiZvYzeETtza7aSI034Y1AfBJboVvOX+fOq1TF+Q==,iv:EFne3Dl49lAp8Wufurv3pjoT99tRcSaVrJmA85i6qSU=,tag:S4CevQN/zmpGJ3SOVB4ahw==,type:str]
|
||||
samba_password: ENC[AES256_GCM,data:UEi/qgYVlBM2xelRvAw42WvAvk4=,iv:Ho9td+rD96VpX/l4RmuQrtUCSQj8YG5zXMKITwcDXC8=,tag:CVRbasHUBZO257P9YSdSXg==,type:str]
|
||||
darman_telegram_user_id: ENC[AES256_GCM,data:x37bHgV9yCU=,iv:QYaR/yz8c5cHVD01ZbhkRYz9t9uyMekbIUQvnWj4kAQ=,tag:Yg3aoxeZja9RecDS0PntLQ==,type:str]
|
||||
pass_broker_pat: ENC[AES256_GCM,data:askNNSjnr0aaFQ==,iv:9JSmZt0t5A/IFUXDPJ49abbboVZMzy7+u5OkoZkYbuk=,tag:yjTDxqcwd4O6m8d5g6hM3g==,type:str]
|
||||
pass_broker_telegram_token: ENC[AES256_GCM,data:2C9ySGfLwBVFHg==,iv:jQLLuRwvW81tHaM4NEHDbT1YnrVenJ8tD6dphQShu5k=,tag:llsNm6Vmxe0wqF3Sh28tBw==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBieFFKUlNRTUFtb0xVcndl
|
||||
blFzejI2Qk5KTmd6MUlldTd0OGUzMlgvSmxnCkxqMXdISThHOGtjNUJBeHdxa0dp
|
||||
Z1hSMC9JeitNeTc2Q3YxRGUyTmpBSmcKLS0tIFlGaHhMQlVYSzRacXAxS2FkMTlM
|
||||
SVptN011NDNkSWNkQURWNHNJdThLdHMKY9bmqFH2MtBNQNEr1D/xB9Ux8J7vbhFI
|
||||
kYSsC2Offuykxl3qdrvnYtqYi9THiDPmyQOAouhg4axYRBi+h1JWCw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age1cekcqyf7073fsytcjxaa9dr9zwkmn4vjg36rv2tgxdglzfv4jvxqvcj6z2
|
||||
- enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBpb0t5TkpXeHBnQXpNTlhZ
|
||||
MG1DQWlDcG9YR0VhMFFXVm53L2ZpalAvLzFnClM0TWU2VWtrcUhuTk9wN1hjZ0lL
|
||||
alJMWTlsSlkrZXFlSUJ5bnRjQ05wMXMKLS0tIEJvRVpJYldrVjE4TGZTb3d4RS9D
|
||||
STlYNGZ2NjJBc0pmV3NJRzhnUHI4aUkKBp9y370pgIRuYr1zNXfXrm2q5g6H4qRZ
|
||||
xxQw11N8OGw4tA1nPY8ahD2LAQRcZo72mOrdAe2DR1OT1BSLEwoh3A==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
recipient: age1qm6ne4mrgwkj7eea5j3vn0qmtw4p5h4eu78vvahhfnd4pk04qausn3qgv2
|
||||
lastmodified: "2026-10-16T15:54:09Z"
|
||||
mac: ENC[AES256_GCM,data:1MVKmhALGhpf0gdb0iuJ8kKE26YkFzB/ipfrZGyr7VYJyA2+Sv54n/sPw/WhJ8cz1iDtPgRATdIa8DEX0dumZqaePdm+j359VYrIcF9VYc3HMoR1NMpDOp9K8jtO4Kt7iJvzQWEDqFtiMn+blXVMMcBsJ9aC8MmDg+nivl6VQT0=,iv:AFRQUpE311b3ZNrhIcf8LGuosrBy2ob6f0Yr/EYWpHs=,tag:+ba7aNv91qWXo0cexD8LBg==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.13.3
|
||||
@@ -4,7 +4,7 @@ let
|
||||
rishot = pkgs.callPackage ../../pkgs/rishot.nix { };
|
||||
in
|
||||
|
||||
# Desktop applications for a workstation host (currently: terra). Split from
|
||||
# Desktop applications for a workstation host (terra, titan). Split from
|
||||
# desktop-hyprland.nix, which owns the *session* (compositor, greeter, audio,
|
||||
# portals); this owns the things the user actually launches inside it.
|
||||
{
|
||||
@@ -19,7 +19,8 @@ in
|
||||
"claude-desktop" # services/desktop/claude-desktop.nix
|
||||
"proton-pass-cli"
|
||||
"vivaldi"
|
||||
"mongodb" # librechat's local db (services/desktop/librechat.nix) — SSPL
|
||||
"nvidia-x11" # titan's RTX 2060
|
||||
"nvidia-settings"
|
||||
];
|
||||
|
||||
programs.steam = {
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
{ config, ... }:
|
||||
|
||||
# LibreChat — web chat UI, talking to the local ollama server (see
|
||||
# hosts/terra/configuration.nix) over its OpenAI-compatible /v1 route.
|
||||
# Only reachable over the tailnet (networking.firewall.trustedInterfaces =
|
||||
# [ "tailscale0" ] in services/vpn/tailscale.nix) — openFirewall stays off.
|
||||
{
|
||||
services.librechat = {
|
||||
enable = true;
|
||||
enableLocalDB = true; # spins up a local, unauthenticated-on-localhost mongodb
|
||||
|
||||
# LibreChat's isEnabled() treats an unset var as false, not true (despite
|
||||
# .env.example suggesting true is the default), so this must be explicit.
|
||||
# Fine to leave open since it's tailnet-only; flip to false once your
|
||||
# account exists to lock it down.
|
||||
env.ALLOW_REGISTRATION = true;
|
||||
|
||||
credentials = {
|
||||
CREDS_KEY = config.sops.secrets.librechat_creds_key.path;
|
||||
CREDS_IV = config.sops.secrets.librechat_creds_iv.path;
|
||||
JWT_SECRET = config.sops.secrets.librechat_jwt_secret.path;
|
||||
JWT_REFRESH_SECRET = config.sops.secrets.librechat_jwt_refresh_secret.path;
|
||||
};
|
||||
|
||||
settings = {
|
||||
version = "1.2.1";
|
||||
endpoints.custom = [
|
||||
{
|
||||
name = "Ollama";
|
||||
# required field but unchecked by ollama's OpenAI-compat shim
|
||||
apiKey = "ollama";
|
||||
baseURL = "http://127.0.0.1:11434/v1";
|
||||
models = {
|
||||
# Schema requires >=1 entry even though fetch=true overwrites this at
|
||||
# runtime with whatever's pulled (hosts/terra/configuration.nix) —
|
||||
# kept roughly in sync so the UI has sane names before the first fetch.
|
||||
default = [ "gemma4:12b" "qwen3.6:35b-a3b" "VladimirGav/qwen3.8-27B-14GB-IQ4:latest" ];
|
||||
fetch = true; # pull the model list from ollama at startup
|
||||
};
|
||||
titleConvo = true;
|
||||
}
|
||||
];
|
||||
|
||||
# Persistent memory is opt-in at the config level — omitting this block
|
||||
# leaves it off regardless of the user's Settings > Personalization toggle.
|
||||
# `agent.provider` must match endpoints.custom[].name above exactly.
|
||||
memory = {
|
||||
personalize = true; # still needs a per-user opt-in toggle in the UI
|
||||
# instructions REPLACES the default extraction prompt, not appends to it —
|
||||
# needed because the smaller llama3.2:3b (since dropped) kept saving its
|
||||
# own assistant boilerplate as memories, a capability ceiling rather than
|
||||
# a prompting gap. validKeys whitelists what can be stored.
|
||||
validKeys = [ "user_preferences" "personal_info" "ongoing_projects" "technical_context" ];
|
||||
agent = {
|
||||
enabled = true;
|
||||
provider = "Ollama";
|
||||
# same model as the chat endpoint's primary driver — when that's
|
||||
# the active chat model, extraction needs no second model swapped
|
||||
# into VRAM alongside it.
|
||||
model = "gemma4:12b";
|
||||
instructions = ''
|
||||
Save memory ONLY using the keys below, and only when the user's
|
||||
message states something durable and genuinely useful to recall
|
||||
in a LATER, unrelated conversation. Small talk, greetings, and
|
||||
anything about what the assistant said or is capable of are NOT
|
||||
memories — if nothing meets the bar, save nothing.
|
||||
|
||||
set_memory REPLACES the entire value stored at a key — it does
|
||||
NOT append to it. Before calling set_memory for a key, check the
|
||||
"Existing memory" section below. If that key already has a
|
||||
value, your new value MUST merge the old and new information
|
||||
into one complete sentence or short paragraph — calling
|
||||
set_memory with only the newest fact silently ERASES everything
|
||||
already stored under that key. Only drop prior details if the
|
||||
user is explicitly correcting or replacing them.
|
||||
|
||||
- user_preferences: explicitly stated preferences (tools, formats, style).
|
||||
- personal_info: durable facts about the user (name, role, timezone).
|
||||
- ongoing_projects: projects or tasks the user is actively working on.
|
||||
- technical_context: durable facts about the user's setup/stack
|
||||
relevant to future answers (e.g. "runs NixOS", "GPU is AMD ROCm").
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user