Rebuild files to add wayland as separate file in system/core

This commit is contained in:
2026-03-07 15:53:17 +01:00
parent d11528d1e2
commit 6a70bc93e9
7 changed files with 606 additions and 549 deletions
+23
View File
@@ -0,0 +1,23 @@
{ config, pkgs, lib, user, inputs, ... }:
{
# Nix settings to use Hyprland's cache for packages
nix.settings = {
substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
};
# Install Hyprland and enable it as the window manager
environment.systemPackages = with pkgs; [ hyprland ];
programs.hyprland = {
enable = true;
xwayland.enable = true;
};
# Hyprland-specific Home Manager configurations
home-manager.users.${user.username} = {
wayland.windowManager.hyprland = {
enable = true;
settings = { };
};
};
}
+1 -66
View File
@@ -1,6 +1,7 @@
{ config, pkgs, lib, user, inputs, ... }:
{
imports = [
./hyprland.nix
./animations_effects/top.nix
./decorations/top.nix
./keyboard_binds/top.nix
@@ -10,70 +11,4 @@
./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
};
};
};
}
+8
View File
@@ -0,0 +1,8 @@
{ config, pkgs, lib, user, inputs, ... }:
{
imports = [
./top.nix
./wayland.nix
];
# .. put any code here
}
@@ -0,0 +1,35 @@
{ config, pkgs, lib, user, ... }:
{
# Enable essential services for a Wayland session
services.dbus.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
wireplumber.enable = true;
};
# XDG Desktop Portal settings for better application integration
xdg.portal = {
enable = true;
config.common.default = [ "hyprland" "gtk" ];
};
# Environment variables for a Wayland session
environment.sessionVariables = {
XDG_SESSION_TYPE = "wayland";
XDG_CURRENT_DESKTOP = "Hyprland";
XCURSOR_SIZE = "24";
};
# Home Manager Wayland configurations
home-manager.users.${user.username} = {
xdg.portal = {
enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ];
config.hyprland = {
"org.freedesktop.impl.portal.Screencast" = [ "hyprland" ];
};
};
};
}
+1
View File
@@ -2,6 +2,7 @@
{
imports = [
./applications/top.nix
./core/top.nix
./development/top.nix
./system_management/top.nix
];