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>
58 lines
2.2 KiB
Nix
58 lines
2.2 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
# Hyprland (wayland) desktop: compositor, login manager, audio, portals.
|
|
{
|
|
imports = [ ./quickshell-greeter.nix ];
|
|
|
|
programs.hyprland.enable = true;
|
|
|
|
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;
|
|
services.pipewire = {
|
|
enable = true;
|
|
alsa.enable = true;
|
|
pulse.enable = true;
|
|
};
|
|
|
|
xdg.portal = {
|
|
enable = true;
|
|
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" ];
|
|
};
|
|
}
|