89 lines
1.7 KiB
Nix
89 lines
1.7 KiB
Nix
#
|
|
# Configuration for a Hyprland stack
|
|
#
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
hyprlandUwsmSession = pkgs.writeTextFile {
|
|
name = "hyprland-nixos-uwsm";
|
|
destination = "/share/wayland-sessions/hyprland-nixos-uwsm.desktop";
|
|
text = ''
|
|
[Desktop Entry]
|
|
Name=Hyprland (NixOS UWSM)
|
|
Comment=Hyprland managed by UWSM with the NixOS session environment
|
|
Exec=${pkgs.writeShellScript "start-hyprland-nixos-uwsm" ''
|
|
. /etc/set-environment
|
|
exec ${lib.getExe pkgs.uwsm} start -F -- /run/current-system/sw/bin/Hyprland
|
|
''}
|
|
Type=Application
|
|
DesktopNames=Hyprland
|
|
'';
|
|
passthru.providedSessions = [ "hyprland-nixos-uwsm" ];
|
|
};
|
|
in
|
|
{
|
|
imports = [
|
|
./base.nix
|
|
./flatpak.nix
|
|
./fonts.nix
|
|
./packages.nix
|
|
./sddm.nix
|
|
];
|
|
services.displayManager.defaultSession = "hyprland-nixos-uwsm";
|
|
|
|
# Hyprland as the star of the show
|
|
programs.hyprland.enable = true;
|
|
programs.hyprland.withUWSM = true;
|
|
services.displayManager.sessionPackages = [ hyprlandUwsmSession ];
|
|
|
|
# XDG portal
|
|
xdg.portal.enable = true;
|
|
xdg.portal.extraPortals = with pkgs; [
|
|
xdg-desktop-portal-gtk
|
|
xdg-desktop-portal-hyprland
|
|
];
|
|
xdg.portal.config.hyprland.default = [
|
|
"hyprland"
|
|
"gtk"
|
|
];
|
|
|
|
# Supplementary packages
|
|
environment.systemPackages = with pkgs; [
|
|
# Hyprland stack
|
|
dunst
|
|
hyprcursor
|
|
hypridle
|
|
hyprland
|
|
hyprlock
|
|
rofi
|
|
awww
|
|
waybar
|
|
wlsunset
|
|
wofi
|
|
|
|
# Helpers
|
|
flatpak
|
|
networkmanagerapplet
|
|
python3
|
|
xdg-utils
|
|
|
|
# Common utilities
|
|
brightnessctl
|
|
foot
|
|
pavucontrol
|
|
pulseaudio # For pactl
|
|
|
|
# Clipboarding
|
|
grim
|
|
slurp
|
|
wl-clipboard
|
|
];
|
|
|
|
# Cursor theme for Hyprland and regular Wayland/XWayland clients.
|
|
environment.sessionVariables = {
|
|
XCURSOR_THEME = "breeze_cursors";
|
|
XCURSOR_SIZE = "24";
|
|
HYPRCURSOR_SIZE = "24";
|
|
};
|
|
}
|