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:
@@ -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