Files
NixOsConfig/modules/nixos/desktop/hyprland.nix
T
Claude 0ce9943d56 Add NixOS modules: boot, users, AMD, disko layout, secrets, Hyprland, Steam
- my.disks generates disko: NVMe btrfs (@root/@home/@nix/@log/@swap) + SATA SSD
  btrfs with one subvolume per ~/Games, Downloads, Documents, Music, Pictures,
  Videos, Storage (nofail)
- lanzaboote Secure Boot, systemd initrd, latest kernel
- AMD CPU/GPU: amdgpu initrd, OpenCL, LACT, optional ROCm
- agenix with host-key identity, optional password and SSH key secrets
- Hyprland (UWSM, XWayland) + greetd/tuigreet, Noctalia services, PipeWire, fonts
- Steam + Proton-GE, gamescope, gamemode
- overlays: compose Hyprland's hyprland-packages + hyprland-extras (upstream
  default lacks the hyprwm dependency overlays)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J1cugeLkfFLZMpiztQ8TyN
2026-10-11 12:38:52 +00:00

75 lines
1.8 KiB
Nix

# Hyprland session: UWSM-managed compositor, greetd login, portals, keyring and
# the small system services a desktop needs. Noctalia, audio and fonts are
# separate files gated on the same option.
{
config,
lib,
pkgs,
...
}:
let
cfg = config.my.desktop.hyprland;
in
{
options.my.desktop.hyprland.enable = lib.mkEnableOption "the Hyprland desktop session";
config = lib.mkIf cfg.enable {
# package/portalPackage stay default: the overlay swaps in the flake builds.
programs.hyprland = {
enable = true;
withUWSM = true;
xwayland.enable = true;
};
services.greetd = {
enable = true;
# Keeps boot messages from drawing over the greeter.
useTextGreeter = true;
settings.default_session = {
command = lib.concatStringsSep " " [
(lib.getExe pkgs.tuigreet)
"--time"
"--remember"
"--remember-user-session"
"--asterisks"
"--sessions ${config.services.displayManager.sessionData.desktops}/share/wayland-sessions"
];
user = "greeter";
};
};
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
security.polkit.enable = true;
services.gnome.gnome-keyring.enable = true;
security.pam.services.greetd.enableGnomeKeyring = true;
programs.dconf.enable = true;
# Electron/Chromium apps use native Wayland.
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# Removable drives and trash/mounts in the file manager.
services.udisks2.enable = true;
services.gvfs.enable = true;
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
environment.systemPackages = with pkgs; [
wl-clipboard
cliphist
grim
slurp
brightnessctl
playerctl
pavucontrol
nautilus
hyprpicker
];
};
}