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:
+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;
|
||||
primaryOutput = "DP-2";
|
||||
defaultUser = "darman";
|
||||
keyboardLayout = "de";
|
||||
cursor = { inherit (config.home-manager.users.darman.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"; }
|
||||
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";
|
||||
# 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";
|
||||
};
|
||||
|
||||
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,153 +0,0 @@
|
||||
{ pkgs, unstable, inputs, ... }:
|
||||
let
|
||||
tome = pkgs.callPackage ../../pkgs/tome.nix { src = inputs.tome; };
|
||||
claude-usage = pkgs.callPackage ../../pkgs/claude-usage.nix { };
|
||||
|
||||
# SUDO_ASKPASS helper: shows sudo's password prompt in quickshell
|
||||
# (HyprChrome/Widgets/Askpass) instead of the terminal. sudo doesn't speak
|
||||
# polkit (setuid + PAM reading the tty), so this reuses the polkit dialog's
|
||||
# look via the askpass mechanism instead — `run0` is the actual polkit-native
|
||||
# alternative.
|
||||
#
|
||||
# Must be a package, not a dotfiles file: SUDO_ASKPASS needs an executable,
|
||||
# and xdg.configFile copies keep store-copy permissions.
|
||||
#
|
||||
# The secret returns over a 0600 fifo (never argv/env, so not visible in
|
||||
# /proc); cancelling closes the fifo unwritten so sudo aborts cleanly.
|
||||
qs-askpass = pkgs.writeShellApplication {
|
||||
name = "qs-askpass";
|
||||
runtimeInputs = [ pkgs.quickshell pkgs.coreutils ];
|
||||
text = ''
|
||||
runtime="''${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"
|
||||
fifo="$(mktemp -u "$runtime/qs-askpass.XXXXXXXX")"
|
||||
mkfifo -m 600 "$fifo"
|
||||
trap 'rm -f "$fifo"' EXIT
|
||||
|
||||
# Returns immediately; the dialog is asynchronous and we block on the
|
||||
# fifo, not on the IPC call.
|
||||
if ! qs ipc call askpass prompt "''${1:-Password:}" "$fifo" >/dev/null 2>&1; then
|
||||
echo "qs-askpass: quickshell is not running or has no askpass handler" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Bounded, so a prompt nobody answers fails instead of wedging sudo for
|
||||
# good. On timeout take the dialog down too, or it would sit there with
|
||||
# nothing listening.
|
||||
if ! secret="$(timeout 120 cat "$fifo")"; then
|
||||
qs ipc call askpass cancel >/dev/null 2>&1 || true
|
||||
echo "qs-askpass: timed out waiting for the prompt" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -n "$secret" ] || exit 1
|
||||
printf '%s\n' "$secret"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
# 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 ];
|
||||
|
||||
home.keyboard.layout = "de";
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user.name = "Erik Simon";
|
||||
user.email = "mail@erik-s.dev";
|
||||
};
|
||||
};
|
||||
|
||||
# direnv + nix-direnv: lets per-repo devShells (e.g. ~/Data/Dev/repos/Tome's
|
||||
# flake.nix) auto-load in the shell AND in Rider via its "direnv
|
||||
# integration" plugin, instead of every dev repo needing its own
|
||||
# jetbrains-toolbox SDK wiring by hand.
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
# Rootless podman runs containers as darman; compose v2 talks to a socket
|
||||
# rather than the docker CLI shim, so point it at the user podman socket
|
||||
# instead of the root one.
|
||||
home.sessionVariables.DOCKER_HOST = "unix:///run/user/1000/podman/podman.sock";
|
||||
|
||||
# Only sets WHICH helper sudo uses; it still only calls it when asked with
|
||||
# `sudo -A` (or when there is no tty at all). Plain `sudo` keeps prompting on
|
||||
# the terminal, deliberately: aliasing it wholesale would break every sudo in
|
||||
# a TTY or over ssh, where there is no shell to draw the dialog.
|
||||
home.sessionVariables.SUDO_ASKPASS = "${qs-askpass}/bin/qs-askpass";
|
||||
|
||||
xdg.userDirs = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
xdg.mime.enable = true;
|
||||
xdg.configFile."quickshell".source = ../../dotfiles/quickshell;
|
||||
xdg.configFile."scripts".source = ../../dotfiles/scripts;
|
||||
|
||||
home.packages = [
|
||||
(pkgs.writeTextDir "share/mime/packages/application-x-ms-sln.xml"
|
||||
(builtins.readFile ../../dotfiles/mime/application-x-ms-sln.xml))
|
||||
unstable.claude-code
|
||||
unstable.codex
|
||||
pkgs.opencode
|
||||
pkgs.quickshell
|
||||
qs-askpass
|
||||
claude-usage
|
||||
pkgs.github-cli
|
||||
pkgs.tea
|
||||
pkgs.docker-compose
|
||||
pkgs.hyprcursor
|
||||
pkgs.papirus-icon-theme
|
||||
tome
|
||||
];
|
||||
|
||||
xdg.desktopEntries.btop = {
|
||||
name = "btop++";
|
||||
genericName = "System Monitor";
|
||||
exec = "btop";
|
||||
icon = "btop";
|
||||
terminal = true;
|
||||
categories = [ "System" "Monitor" ];
|
||||
noDisplay = true;
|
||||
};
|
||||
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
env.SHELL = "${pkgs.zsh}/bin/zsh";
|
||||
terminal.shell = {
|
||||
program = "${pkgs.zsh}/bin/zsh";
|
||||
args = [ "-l" ];
|
||||
};
|
||||
window = {
|
||||
padding = { x = 10; y = 10; };
|
||||
opacity = 0.8;
|
||||
};
|
||||
font.normal = {
|
||||
family = "DepartureMono Nerd Font";
|
||||
style = "Regular";
|
||||
};
|
||||
colors.primary = {
|
||||
background = "#0F1012";
|
||||
foreground = "#ffd369";
|
||||
};
|
||||
# hints.enabled = [
|
||||
# {
|
||||
# hyperlinks = true;
|
||||
# regex = "(ipfs:|ipns:|magnet:|mailto:|gemini://|gopher://|https://|http://|news:|file:|git://|ssh:|ftp://)[^\\u0000-\\u001F\\u007F-\\u009F<>\"\\s{-}\\^⟨⟩`]+";
|
||||
# command = "xdg-open";
|
||||
# mouse.enabled = true;
|
||||
# }
|
||||
# ];
|
||||
keyboard.bindings = [
|
||||
# ESC + CR: nix has no literal escape for the ESC control char, so
|
||||
# fromJSON decodes it from the JSON unicode escape below.
|
||||
{ key = "Return"; mods = "Shift"; chars = builtins.fromJSON ''"\u001B\r"''; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,308 +0,0 @@
|
||||
{ lib, pkgs, config, inputs, ... }:
|
||||
|
||||
let
|
||||
lua = lib.generators.mkLuaInline;
|
||||
|
||||
# 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
|
||||
# session's environment (hm-session-vars.sh is only sourced by login shells).
|
||||
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 = {
|
||||
exec = cmd: lua ''hl.dsp.exec_cmd("${cmd}")'';
|
||||
global = name: lua ''hl.dsp.global("${name}")'';
|
||||
exit = lua "hl.dsp.exit()";
|
||||
killactive = lua "hl.dsp.window.close()";
|
||||
togglefloating = lua ''hl.dsp.window.float({ action = "toggle" })'';
|
||||
fullscreen = lua "hl.dsp.window.fullscreen()"; # mode 0
|
||||
maximize = lua ''hl.dsp.window.fullscreen({ mode = "maximized" })''; # mode 1
|
||||
togglegroup = lua "hl.dsp.group.toggle()";
|
||||
changegroupactive = lua "hl.dsp.group.next()";
|
||||
drag = lua "hl.dsp.window.drag()";
|
||||
resizemouse = lua "hl.dsp.window.resize()";
|
||||
movefocus = dir: lua ''hl.dsp.focus({ direction = "${dir}" })'';
|
||||
movewindow = dir: lua ''hl.dsp.window.move({ direction = "${dir}" })'';
|
||||
resizeactive = x: y:
|
||||
lua ''hl.dsp.window.resize({ x = ${toString x}, y = ${toString y}, relative = true })'';
|
||||
workspace = n: lua ''hl.dsp.focus({ workspace = ${toString n} })'';
|
||||
workspaceRef = s: lua ''hl.dsp.focus({ workspace = "${s}" })'';
|
||||
movetoworkspace = n: lua ''hl.dsp.window.move({ workspace = ${toString n} })'';
|
||||
togglespecial = name: lua ''hl.dsp.workspace.toggle_special("${name}")'';
|
||||
};
|
||||
|
||||
bind = keys: dispatcher: { _args = [ keys dispatcher ]; };
|
||||
bindo = keys: dispatcher: opts: { _args = [ keys dispatcher opts ]; };
|
||||
|
||||
# SUPER + 1..9 → workspaces 1..9, SUPER + 0 → workspace 10.
|
||||
wsKeys = [
|
||||
{ k = "1"; n = 1; } { k = "2"; n = 2; } { k = "3"; n = 3; }
|
||||
{ k = "4"; n = 4; } { k = "5"; n = 5; } { k = "6"; n = 6; }
|
||||
{ k = "7"; n = 7; } { k = "8"; n = 8; } { k = "9"; n = 9; }
|
||||
{ k = "0"; n = 10; }
|
||||
];
|
||||
in
|
||||
{
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ipc = "on";
|
||||
splash = false;
|
||||
preload = [ wallpaper ];
|
||||
wallpaper = [
|
||||
{ monitor = "DP-2"; path = wallpaper; }
|
||||
{ monitor = "HDMI-A-1"; path = wallpaper; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
# Unloaded for now; re-add together with the plugin.hyprchrome settings below.
|
||||
# plugins = [ inputs.hypr-chrome.packages.${pkgs.stdenv.hostPlatform.system}.default ];
|
||||
settings = {
|
||||
# ---- colours (from colors.conf) ----
|
||||
fg_color = { _var = "rgba(eeeeeeff)"; };
|
||||
fg_accent = { _var = "rgba(e8722aff)"; };
|
||||
fg_accent_alt = { _var = "rgba(ff9d42ff)"; };
|
||||
bg_color = { _var = "rgba(0f1012ff)"; };
|
||||
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; }
|
||||
];
|
||||
|
||||
# ---- variables (general/decoration/input/misc/...) ----
|
||||
config = {
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
numlock_by_default = true;
|
||||
follow_mouse = 1;
|
||||
sensitivity = 0;
|
||||
};
|
||||
|
||||
debug.disable_logs = false;
|
||||
|
||||
general = {
|
||||
border_size = 1;
|
||||
col = {
|
||||
inactive_border = lua "bg_accent";
|
||||
active_border = {
|
||||
colors = [ (lua "fg_accent") (lua "fg_accent_alt") ];
|
||||
angle = 45;
|
||||
};
|
||||
};
|
||||
layout = "dwindle";
|
||||
gaps_in = 4;
|
||||
gaps_out = 8;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
dim_special = 0.3;
|
||||
rounding = 25;
|
||||
rounding_power = 1.0;
|
||||
blur = {
|
||||
enabled = true;
|
||||
special = true; # blur behind the special workspace
|
||||
size = 6;
|
||||
passes = 2;
|
||||
ignore_opacity = true;
|
||||
};
|
||||
shadow.enabled = false;
|
||||
active_opacity = 0.9;
|
||||
inactive_opacity = 0.9;
|
||||
};
|
||||
|
||||
animations.enabled = true;
|
||||
|
||||
misc = {
|
||||
close_special_on_empty = true;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
};
|
||||
|
||||
binds = {
|
||||
hide_special_on_workspace_change = true;
|
||||
workspace_back_and_forth = true;
|
||||
allow_workspace_cycles = true;
|
||||
};
|
||||
|
||||
# Unloaded for now — Hyprland rejects plugin config for a plugin that is
|
||||
# not loaded, so this stays commented until it goes back in `plugins` above.
|
||||
# plugin.hyprchrome = {
|
||||
# enabled = true;
|
||||
# glow_size = 12;
|
||||
# glow_strength = 0.85;
|
||||
# shadow_size = 24;
|
||||
# shadow_color = lua "bg_color";
|
||||
# shadow_offset = lua "{ 4, 8 }";
|
||||
# outline_size = lua "2";
|
||||
# outline_color = lua "fg_color";
|
||||
# };
|
||||
};
|
||||
|
||||
# ---- animations ----
|
||||
# specialWorkspace, enabled, speed 8, default curve, slidefadevert -50%
|
||||
animation = [
|
||||
{ leaf = "specialWorkspace"; enabled = true; speed = 8; bezier = "default"; style = "slidefadevert -50%"; }
|
||||
];
|
||||
|
||||
# ---- environment (environment.conf) ----
|
||||
env = [
|
||||
{ _args = [ "HYPRCURSOR_THEME" cursorName ]; }
|
||||
{ _args = [ "HYPRCURSOR_SIZE" cursorSize ]; }
|
||||
{ _args = [ "XCURSOR_THEME" cursorName ]; }
|
||||
{ _args = [ "XCURSOR_SIZE" cursorSize ]; }
|
||||
{ _args = [ "GDK_BACKEND" "wayland,x11" ]; }
|
||||
{ _args = [ "SDL_VIDEODRIVER" "wayland" ]; }
|
||||
{ _args = [ "CLUTTER_BACKEND" "wayland" ]; }
|
||||
{ _args = [ "XDG_CURRENT_DESKTOP" "Hyprland" ]; }
|
||||
{ _args = [ "XDG_SESSION_DESKTOP" "Hyprland" ]; }
|
||||
{ _args = [ "XDG_SESSION_TYPE" "wayland" ]; }
|
||||
{ _args = [ "QT_QPA_PLATFORMTHEME" "qt6ct" ]; }
|
||||
];
|
||||
|
||||
# ---- keybinds (keybinds.conf) ----
|
||||
bind = [
|
||||
(bindo "SUPER + SUPER_L" (dsp.exec "bash $HOME/.config/quickshell/open_launcher.sh") { release = true; })
|
||||
(bind "SUPER + Return" (dsp.exec "alacritty"))
|
||||
|
||||
# quickshell app-launcher variants (evaluating — pick one)
|
||||
]
|
||||
++ (map (n: bind "SUPER + CTRL + ${toString n}" (dsp.global "quickshell:launcher${toString n}")) (lib.range 1 9))
|
||||
++ [
|
||||
# variant 10 (CTRL+0 is already the quickshell restart binding below)
|
||||
(bind "SUPER + CTRL + SHIFT + 0" (dsp.global "quickshell:launcher10"))
|
||||
# variant 11 cyber dock
|
||||
(bind "SUPER + CTRL + SHIFT + D" (dsp.global "quickshell:launcher11"))
|
||||
# restart quickshell (also starts it if not running)
|
||||
(bind "SUPER + CTRL + 0" (dsp.exec "qs kill; sleep 0.3; qs"))
|
||||
# toggle the Slant sidebar
|
||||
(bind "SUPER + CTRL + S" (dsp.global "quickshell:sidebar"))
|
||||
# toggle the host vitals HUD
|
||||
(bind "SUPER + CTRL + V" (dsp.global "quickshell:vitals"))
|
||||
# toggle the debug widget stage (centred on the secondary monitor)
|
||||
(bind "SUPER + CTRL + D" (dsp.global "quickshell:debug"))
|
||||
# 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.
|
||||
(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 + SHIFT + S" (dsp.exec "grimblast copy area --freeze"))
|
||||
(bind "Print" (dsp.exec "rishot"))
|
||||
(bind "SUPER + L" (dsp.exec "hyprlock"))
|
||||
(bind "SUPER + W" (dsp.exec "waypaper --random"))
|
||||
|
||||
# window management
|
||||
(bind "SUPER + Q" dsp.killactive)
|
||||
(bind "SUPER + SHIFT + Q" dsp.exit)
|
||||
(bind "SUPER + F" dsp.maximize)
|
||||
(bind "SUPER + SHIFT + F" dsp.fullscreen)
|
||||
(bind "SUPER + Space" dsp.togglefloating)
|
||||
|
||||
# focus
|
||||
(bind "SUPER + left" (dsp.movefocus "left"))
|
||||
(bind "SUPER + right" (dsp.movefocus "right"))
|
||||
(bind "SUPER + up" (dsp.movefocus "up"))
|
||||
(bind "SUPER + down" (dsp.movefocus "down"))
|
||||
|
||||
# move
|
||||
(bind "SUPER + SHIFT + left" (dsp.movewindow "left"))
|
||||
(bind "SUPER + SHIFT + right" (dsp.movewindow "right"))
|
||||
(bind "SUPER + SHIFT + up" (dsp.movewindow "up"))
|
||||
(bind "SUPER + SHIFT + down" (dsp.movewindow "down"))
|
||||
|
||||
# resize
|
||||
(bind "SUPER + CTRL + left" (dsp.resizeactive (-20) 0))
|
||||
(bind "SUPER + CTRL + right" (dsp.resizeactive 20 0))
|
||||
(bind "SUPER + CTRL + up" (dsp.resizeactive 0 (-20)))
|
||||
(bind "SUPER + CTRL + down" (dsp.resizeactive 0 20))
|
||||
|
||||
# tabbed / group
|
||||
(bind "SUPER + g" dsp.togglegroup)
|
||||
(bind "SUPER + tab" dsp.changegroupactive)
|
||||
|
||||
# special workspaces
|
||||
(bind "SUPER + T" (dsp.togglespecial "terminal"))
|
||||
(bind "SUPER + C" (dsp.togglespecial "communications"))
|
||||
(bind "SUPER + M" (dsp.togglespecial "music"))
|
||||
# (bind "SUPER + V" (dsp.togglespecial "version_control"))
|
||||
|
||||
# cycle workspaces
|
||||
(bind "SUPER + ALT + up" (dsp.workspaceRef "e+1"))
|
||||
(bind "SUPER + ALT + down" (dsp.workspaceRef "e-1"))
|
||||
|
||||
# mouse move / resize
|
||||
(bindo "SUPER + mouse:272" dsp.drag { mouse = true; })
|
||||
(bindo "SUPER + mouse:273" dsp.resizemouse { mouse = true; })
|
||||
|
||||
# multimedia (pipewire)
|
||||
(bindo "XF86AudioRaiseVolume" (dsp.exec "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+") { repeating = true; })
|
||||
(bindo "XF86AudioLowerVolume" (dsp.exec "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-") { repeating = true; })
|
||||
(bind "XF86AudioMute" (dsp.exec "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"))
|
||||
(bind "XF86AudioPlay" (dsp.exec "playerctl play-pause"))
|
||||
(bind "XF86AudioPause" (dsp.exec "playerctl play-pause"))
|
||||
(bind "XF86AudioNext" (dsp.exec "playerctl next"))
|
||||
(bind "XF86AudioPrev" (dsp.exec "playerctl previous"))
|
||||
]
|
||||
++ (map (w: bind "SUPER + ${w.k}" (dsp.workspace w.n)) wsKeys)
|
||||
++ (map (w: bind "SUPER + SHIFT + ${w.k}" (dsp.movetoworkspace w.n)) wsKeys);
|
||||
|
||||
# ---- window rules (windowrules.conf) ----
|
||||
window_rule = [
|
||||
{ name = "games"; match.class = "gamescope"; workspace = "name:game"; opacity = "1 1 override"; }
|
||||
{ name = "vivaldi"; match.title = "(.*)(- YouTube - Vivaldi)"; opacity = "1 1 override"; }
|
||||
{ name = "jetbrains"; match.class = "(jetbrains-)(.*)"; no_initial_focus = true; float = true; center = true; }
|
||||
{ name = "jetbrains-toolbox"; match.class = "jetbrains-toolbox"; move = "1933 21"; }
|
||||
{ name = "comms"; match.class = "discord|org.telegram.desktop"; workspace = "special:communications"; }
|
||||
{ name = "music"; match.class = "qbz"; workspace = "special:music"; }
|
||||
{ name = "vicinae"; match.class = "vicinae"; stay_focused = true; }
|
||||
{ name = "gitkraken"; match.class = "gitkraken"; workspace = "special:version_control"; }
|
||||
];
|
||||
|
||||
# ---- workspace rules (workspacerules.conf) ----
|
||||
workspace_rule = [
|
||||
{ workspace = "name:game"; monitor = "DP-2"; 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; }
|
||||
{ workspace = "special:version_control"; on_created_empty = "com.axosoft.GitKraken"; gaps_out = 128; }
|
||||
];
|
||||
|
||||
# ---- autostart (autostart.conf) ----
|
||||
on = {
|
||||
_args = [
|
||||
"hyprland.start"
|
||||
(lua ''
|
||||
function()
|
||||
-- No polkit agent started here: quickshell registers its own
|
||||
-- (HyprChrome/Widgets/Polkit), and a session admits only one.
|
||||
hl.exec_cmd("cosmic-settings-daemon")
|
||||
hl.exec_cmd("quickshell")
|
||||
hl.exec_cmd("alacritty", { workspace = "special:terminal silent" })
|
||||
hl.exec_cmd("kbuildsycoca6 --noincremental")
|
||||
end'')
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-cosmic ];
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
# 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 { };
|
||||
|
||||
iconTheme = "Amy-Dark-Icons";
|
||||
iconThemePackage = amyDarkIcons;
|
||||
iconThemeFolder = "${iconThemePackage}/share/icons/${iconTheme}";
|
||||
in
|
||||
{
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Dracula";
|
||||
package = pkgs.dracula-theme;
|
||||
};
|
||||
iconTheme = {
|
||||
name = iconTheme;
|
||||
package = iconThemePackage;
|
||||
};
|
||||
};
|
||||
|
||||
# XCURSOR_THEME alone isn't enough for Steam: steamwebhelper runs inside a
|
||||
# pressure-vessel container with its own /etc, so XCURSOR_PATH doesn't
|
||||
# resolve there and it falls back to the core X11 cursor. $HOME and /nix are
|
||||
# bind-mounted in though, so the ~/.icons symlink `dotIcons` drops still
|
||||
# resolves — same fix as the flatpak workaround below.
|
||||
home.pointerCursor = {
|
||||
name = "HyprChrome";
|
||||
package = hyprchromeCursors;
|
||||
size = 36;
|
||||
gtk.enable = true;
|
||||
hyprcursor.enable = true;
|
||||
};
|
||||
|
||||
# Flatpak apps can't see XDG_DATA_DIRS/nix-store theme paths, so the
|
||||
# portal-reported theme names resolve to nothing and fall back to Adwaita;
|
||||
# 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;
|
||||
|
||||
dconf.settings."org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
gtk-theme = "Dracula";
|
||||
icon-theme = iconTheme;
|
||||
};
|
||||
|
||||
# "qtct" (qt5ct/qt6ct) instead of "kde" avoids pulling in
|
||||
# kdePackages.systemsettings just for the platform-theme plugin — kvantum
|
||||
# itself carries the Dracula colors, qt5ct/qt6ct just need to be told to
|
||||
# use it as the style.
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "qtct";
|
||||
style.name = "kvantum";
|
||||
};
|
||||
xdg.configFile."Kvantum/kvantum.kvconfig".text = ''
|
||||
[General]
|
||||
theme=Dracula
|
||||
'';
|
||||
xdg.configFile."Kvantum/Dracula".source =
|
||||
"${pkgs.dracula-theme}/share/Kvantum/Dracula";
|
||||
|
||||
# Quickshell's IconImage/Quickshell.iconPath() resolves icons through the
|
||||
# Qt platform theme, not GTK — so the app-launcher grid needs the icon
|
||||
# theme set HERE (qt5ct/qt6ct), separately from the GTK dconf key above.
|
||||
xdg.configFile."qt5ct/qt5ct.conf".text = ''
|
||||
[Appearance]
|
||||
style=kvantum
|
||||
icon_theme=${iconTheme}
|
||||
'';
|
||||
xdg.configFile."qt6ct/qt6ct.conf".text = ''
|
||||
[Appearance]
|
||||
style=kvantum
|
||||
icon_theme=${iconTheme}
|
||||
'';
|
||||
}
|
||||
+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;
|
||||
}
|
||||
Reference in New Issue
Block a user