Files
nixos/Droidnix/generated/hyprland/top.nix
T
2026-03-06 23:01:13 +01:00

81 lines
3.2 KiB
Nix

{ config, pkgs, lib, user, inputs, ... }:
{
imports = [
./animations_effects/top.nix
./decorations/top.nix
./keyboard_binds/top.nix
./notifications/top.nix
./statusbar_tray/top.nix
./task_launcher/top.nix
./task_window_workspace_switcher/top.nix
./window_rules/top.nix
];
# Nix settings to use Hyprland's cache for packages
# This allows Nix to download pre-built packages from the Hyprland cache,
# which can speed up the installation process and ensure compatibility.
nix.settings = {
substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
};
# Enable essential services for a Wayland session
services.dbus.enable = true; # D-Bus is required for inter-process communication
services.pipewire = {
enable = true;
alsa.enable = true; # Basic audio support using ALSA
pulse.enable = true; # PulseAudio support for better audio management
wireplumber.enable = true; # Audio device management and routing
};
# XDG Desktop Portal settings for better application integration
# The XDG Desktop Portal provides a way for applications to interact with the desktop environment.
xdg.portal = {
enable = true;
config.common.default = [ "hyprland" "gtk" ]; # Use Hyprland and GTK as default portal implementations
};
# Environment variables for a Wayland session with Hyprland
# These variables help applications understand the desktop environment and session type.
environment.sessionVariables = {
XDG_SESSION_TYPE = "wayland"; # Use Wayland instead of X11 for the session
XDG_CURRENT_DESKTOP = "Hyprland"; # Define the current desktop environment as Hyprland
XCURSOR_SIZE = "24"; # Set the size of the mouse cursor to 24 pixels
};
# Install Hyprland and enable it as the window manager
# Here, we're only installing the Hyprland package itself for a minimal setup.
environment.systemPackages = with pkgs; [ hyprland ];
# Configure Hyprland as the window manager
# This section enables Hyprland as the window manager and sets basic configurations.
programs.hyprland = {
enable = true; # Start Hyprland as the window manager
xwayland.enable = true; # Enable XWayland to run X11 applications within the Wayland session
};
# Home-manager configuration for user-specific settings
# Home-manager is used to manage user-specific configurations and packages.
home-manager = {
# Enable Hyprland as the Wayland window manager for the user session
wayland.windowManager.hyprland = {
enable = true; # Enable Hyprland as the window manager for the user
settings = {
# Minimal configuration, customize later as needed
# This is where you would add custom keybinds, workspace settings, etc.
};
};
# XDG portal settings for user sessions
# These settings ensure that applications can interact properly with the Hyprland session.
xdg.portal = {
enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ]; # Hyprland-specific portal implementation
config.hyprland = {
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ]; # Enable screencasting support
};
};
}
}