feat(terra): Quickshell lock screen, Star Citizen, NexusMods, TeamSpeak

Also jellyfin-mpv-shim, mangohud logging, portal-backed xdg-open,
systemd-resolved with fallback DNS, and keyring under the user manager.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 00:37:40 +01:00
co-authored by Claude Opus 5.5
parent 7a68716c1c
commit b02d698c1a
22 changed files with 866 additions and 170 deletions
+9 -2
View File
@@ -15,6 +15,11 @@ in
"steam"
"steam-unwrapped"
"steam-run"
"rsi-launcher" # services/desktop/star-citizen.nix (terra)
"rsi-installer"
"teamspeak6-client" # terra
"7zz" # nexusmods-app-unfree (terra): RAR support
"uasm" # builds 7zz
"claude-code"
"claude-desktop" # services/desktop/claude-desktop.nix
"proton-pass-cli"
@@ -35,6 +40,9 @@ in
};
hardware.graphics.enable32Bit = true;
# Rocket League LAN (UE3): 14001 discovery, 7777 game
networking.firewall.allowedUDPPorts = [ 7777 14001 ];
environment.systemPackages = with pkgs; [
alacritty
zed-editor
@@ -49,8 +57,7 @@ in
jq
dotnetCorePackages.sdk_10_0
nodejs
yaak # desktop API client (REST/GraphQL/gRPC)
# pkgsRocm, not plain blender: Cycles needs HIP to render on the RX 6800 XT.
yaak # desktop API client (REST/GraphQL/gRPC) # pkgsRocm, not plain blender: Cycles needs HIP to render on the RX 6800 XT.
pkgsRocm.blender
];
+28 -2
View File
@@ -1,4 +1,4 @@
{ pkgs, ... }:
{ config, pkgs, ... }:
# Hyprland (wayland) desktop: compositor, login manager, audio, portals.
{
@@ -9,6 +9,20 @@
services.gnome.gnome-keyring.enable = true;
security.pam.services.login.enableGnomeKeyring = true;
security.pam.services.greetd.enableGnomeKeyring = true;
# Quickshell lock screen (dotfiles/quickshell/HyprChrome/Widgets/Lock).
security.pam.services.hyprchrome-lock = { };
# The daemon PAM spawns inside greetd's session dies unseen, and Vivaldi then
# D-Bus-activates a locked one. Run it from the (lingering) user manager so
# PAM unlocks that one instead; nixpkgs builds it without socket activation.
systemd.user.services.gnome-keyring-daemon = {
description = "GNOME Keyring daemon";
wantedBy = [ "default.target" ];
serviceConfig = {
ExecStart = "${config.security.wrapperDir}/gnome-keyring-daemon --foreground --components=pkcs11,secrets --control-directory=%t/keyring";
Restart = "on-failure";
};
};
# Audio (pipewire replaces pulseaudio/jack).
security.rtkit.enable = true;
@@ -20,12 +34,24 @@
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-cosmic ];
extraPortals = [ pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-cosmic pkgs.xdg-desktop-portal-gtk ];
config.common.default = [ "hyprland" "cosmic" ];
# OpenURI (xdg-open via xdgOpenUsePortal, apps opening links) is only
# exported when some backend implements AppChooser; only gtk does.
config.common."org.freedesktop.impl.portal.AppChooser" = [ "gtk" ];
# Steam's private /tmp hides vivaldi's singleton socket; links opened there
# started a second browser on the same profile.
xdgOpenUsePortal = true;
};
hardware.graphics.enable = true; # OpenGL/Vulkan for the compositor + apps
services.libinput.enable = true;
networking.networkmanager.enable = true;
networking.networkmanager.dns = "systemd-resolved";
# Fallback only applies when DHCP gave no DNS; networks that block public :53 still work.
services.resolved = {
enable = true;
settings.Resolve.FallbackDNS = [ "1.1.1.1" "9.9.9.9" ];
};
}
+28
View File
@@ -0,0 +1,28 @@
{ pkgs, inputs, ... }:
# NexusMods.App (dev): nixpkgs' package built from the local checkout instead
# of the v0.21.1 release, for the Baldur's Gate 3 load order (modsettings.lsx)
# work on the feat/bg3-load-order branch. Builds the branch's last commit, so
# commit there, then `nix flake update nexusmods-app` here.
#
# The branch is based on a main commit after v0.21.1 with the same
# Directory.Packages.props, so nixpkgs' NuGet lock (deps.json) still applies.
# If a build fails restoring packages, regenerate it with the package's
# passthru.fetch-deps.
let
version = "0.21.1-bg3";
nexusmods-app = pkgs.nexusmods-app-unfree.overrideAttrs (old: {
inherit version;
src = inputs.nexusmods-app;
# nixpkgs links the release tag, which a local checkout doesn't have
meta = old.meta // {
changelog = "https://github.com/Nexus-Mods/NexusMods.App/blob/main/CHANGELOG.md";
};
});
in
{
environment.systemPackages = [ nexusmods-app ];
# Upstream discontinued the app, which nixpkgs flags as a known vulnerability.
nixpkgs.config.permittedInsecurePackages = [ "nexusmods-app-unfree-${version}" ];
}
+37
View File
@@ -0,0 +1,37 @@
{ inputs, pkgs, ... }:
let
sc = inputs.nix-citizen.packages.${pkgs.stdenv.hostPlatform.system};
in
# Star Citizen via nix-citizen's RSI Launcher (wine-astral). The module also
# sets the LUG prerequisites: vm.max_map_count, file limits, joystick udev, ntsync.
{
imports = [ inputs.nix-citizen.nixosModules.StarCitizen ];
nix.settings = {
substituters = [ "https://nix-citizen.cachix.org" ];
trusted-public-keys = [ "nix-citizen.cachix.org-1:lPMkWc2X8XD4/7YPEEwXKKBg+SVbYTVrAaLA2wQTKCo=" ];
};
programs.rsi-launcher = {
enable = true;
# The overlay rebuilds wine-astral + mingw gcc against our nixpkgs (no cache
# hit; froze terra), and its fallback indexes packages by the platform attrset.
includeOverlay = false;
package = sc.rsi-launcher;
wine = sc.wine-astral;
location = "/mnt/ssd_01/games/rsi-launcher"; # ~130G, wants an SSD
# No gamescope: nested it has no clipboard sync and a us keymap, and it can't
# wrap just the game (the launcher spawns it). Workspace: home/desktop/hyprland.nix.
# Back onto wine's X11 driver: the Wayland one's clipboard dies on Hyprland
# ("opcode 3 of zwlr_data_control_device_v1 is NULL"). Runs after the script disables it.
preCommands = ''WINEDLLOVERRIDES="''${WINEDLLOVERRIDES%;winex11.drv=d}"'';
};
# The game peaks above terra's 32G and has no swap to fall back on.
zramSwap = {
enable = true;
memoryPercent = 50;
};
}