Added basic hyprland with custom bindings.conf
This commit is contained in:
+78
-20
@@ -439,7 +439,7 @@ This code defines the machine to build. Just search and replace traveldroid to p
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
* Now we reach the top of the hierarchiy which will call all other imports
|
||||
* Now we reach the top of the hierarchy which will call all other imports
|
||||
|
||||
** =generated/top.nix=
|
||||
The ./generated/top.nix file acts as an anchor or entry point for the entire chain of imports in the pyramid structure.
|
||||
@@ -461,20 +461,6 @@ The ./generated/top.nix file acts as an anchor or entry point for the entire cha
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
** =generated/top.nix=
|
||||
This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder
|
||||
#+BEGIN_SRC nix :tangle generated/top.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
{ config, pkgs, lib, user, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hyprland/top.nix
|
||||
./mangowc/top.nix
|
||||
./system/top.nix
|
||||
];
|
||||
# .. put any code here
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
** =generated/hyprland/top.nix=
|
||||
This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder
|
||||
#+BEGIN_SRC nix :tangle generated/hyprland/top.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
@@ -490,7 +476,73 @@ This is top file of this level which contains the bare necessities for this subj
|
||||
./task_window_workspace_switcher/top.nix
|
||||
./window_rules/top.nix
|
||||
];
|
||||
# .. put any code here
|
||||
|
||||
# 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
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
@@ -612,11 +664,17 @@ This is top file of this level which contains the bare necessities for this subj
|
||||
This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder
|
||||
#+BEGIN_SRC nix :tangle generated/hyprland/keyboard_binds/top.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
{ config, pkgs, lib, user, inputs, ... }:
|
||||
let
|
||||
# Read the contents of the bindings.conf file
|
||||
bindingsContent = builtins.readFile ./assets/hyprland/conf/bindings.conf;
|
||||
# Create a configuration file from the bindings content
|
||||
configFile = pkgs.writeText "hyprland.conf" bindingsContent;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
# No subfolders to import
|
||||
];
|
||||
# .. put any code here
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true; # Enable Hyprland as the window manager
|
||||
config = configFile; # Use the generated configuration file
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
|
||||
Reference in New Issue
Block a user