Files
NixOsConfig/modules/nixos/desktop/hyprland.nix
T
2026-10-12 18:15:38 +03:00

89 lines
2.1 KiB
Nix
Executable File

# 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.displayManager.sddm = {
enable = true;
wayland.enable = true;
settings = {
Autologin = {
Session = "hyprland.desktop";
User = "faumaray";
};
};
};
services.greetd = {
enable = false;
# 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
pkgs.xdg-desktop-portal-hyprland
];
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
kdePackages.dolphin
kdePackages.dolphin-plugins
hyprpicker
];
};
}