greetd now runs a throwaway Hyprland hosting dotfiles/quickshell/greeter.qml, configured per host via homelab.greeter. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
135 lines
4.2 KiB
Nix
135 lines
4.2 KiB
Nix
# ---- 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/librechat.nix
|
|
];
|
|
|
|
networking.hostName = "terra";
|
|
|
|
homelab.greeter = {
|
|
monitors = config.home-manager.users.darman.wayland.windowManager.hyprland.settings.monitor;
|
|
primaryOutput = "DP-2";
|
|
defaultUser = "darman";
|
|
keyboardLayout = "de";
|
|
};
|
|
|
|
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 ];
|
|
|
|
# ---- 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";
|
|
fsType = "ext4";
|
|
options = [ "nofail" ];
|
|
};
|
|
fileSystems."/mnt/ssd_01" = {
|
|
device = "/dev/disk/by-uuid/6ca18a9f-27bc-4e58-aea8-de43a0d0ed5d";
|
|
fsType = "ext4";
|
|
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";
|
|
}
|