mirror of
https://github.com/zephrynis/nix-flake.git
synced 2026-02-18 20:21:53 +00:00
Add Hyprland configuration and integrate into home and laptop setups
This commit is contained in:
@@ -10,14 +10,14 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Optional: Hyprland (if you want a tiling Wayland compositor)
|
||||
# hyprland.url = "github:hyprwm/Hyprland";
|
||||
# Hyprland - Tiling Wayland compositor
|
||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||
|
||||
# Optional: Other useful inputs
|
||||
# nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }@inputs: {
|
||||
outputs = { self, nixpkgs, home-manager, hyprland, ... }@inputs: {
|
||||
# NixOS configuration for your hostname(s)
|
||||
nixosConfigurations = {
|
||||
# Desktop PC configuration
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
];
|
||||
|
||||
# Home Manager configuration for user-level dotfiles and applications
|
||||
|
||||
home.username = "zeph";
|
||||
@@ -22,6 +26,7 @@
|
||||
# wezterm
|
||||
|
||||
# File managers
|
||||
dolphin
|
||||
# thunar
|
||||
# ranger
|
||||
# nnn
|
||||
@@ -38,20 +43,24 @@
|
||||
# slack
|
||||
|
||||
# Screenshots and screen recording
|
||||
# flameshot
|
||||
# maim
|
||||
grim # Screenshot tool for Wayland
|
||||
slurp # Screen area selector for Wayland
|
||||
# obs-studio
|
||||
|
||||
# System utilities
|
||||
# rofi
|
||||
# dunst
|
||||
# polybar
|
||||
# picom
|
||||
# Hyprland essentials
|
||||
waybar # Status bar
|
||||
dunst # Notifications
|
||||
wofi # App launcher
|
||||
# rofi-wayland # Alternative launcher
|
||||
|
||||
# Wayland utilities
|
||||
wl-clipboard # Clipboard for Wayland
|
||||
|
||||
# Ricing essentials
|
||||
# hyprpaper # Wallpaper daemon
|
||||
# swww # Alternative animated wallpaper
|
||||
# lxappearance
|
||||
# nitrogen # wallpaper setter
|
||||
# pywal # color scheme generator
|
||||
# pywal # Color scheme generator
|
||||
|
||||
# Themes and icons
|
||||
# papirus-icon-theme
|
||||
|
||||
156
home/hyprland.nix
Normal file
156
home/hyprland.nix
Normal file
@@ -0,0 +1,156 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Hyprland configuration
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
xwayland.enable = true;
|
||||
|
||||
settings = {
|
||||
# Monitor configuration
|
||||
monitor = ",preferred,auto,1";
|
||||
|
||||
# Autostart applications
|
||||
exec-once = [
|
||||
"waybar"
|
||||
"dunst"
|
||||
# "hyprpaper"
|
||||
];
|
||||
|
||||
# Environment variables
|
||||
env = [
|
||||
"XCURSOR_SIZE,24"
|
||||
"QT_QPA_PLATFORMTHEME,qt5ct"
|
||||
];
|
||||
|
||||
# Input configuration
|
||||
input = {
|
||||
kb_layout = "gb";
|
||||
follow_mouse = 1;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
disable_while_typing = true;
|
||||
};
|
||||
|
||||
sensitivity = 0;
|
||||
};
|
||||
|
||||
# General settings
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 10;
|
||||
border_size = 2;
|
||||
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
|
||||
layout = "dwindle";
|
||||
allow_tearing = false;
|
||||
};
|
||||
|
||||
# Decoration
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
};
|
||||
|
||||
drop_shadow = true;
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
"col.shadow" = "rgba(1a1a1aee)";
|
||||
};
|
||||
|
||||
# Animations
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
|
||||
# Layout
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
# Window rules
|
||||
windowrulev2 = [
|
||||
"float,class:^(pavucontrol)$"
|
||||
"float,class:^(blueman-manager)$"
|
||||
];
|
||||
|
||||
# Keybindings
|
||||
"$mod" = "SUPER";
|
||||
|
||||
bind = [
|
||||
# Basic
|
||||
"$mod, Q, exec, alacritty"
|
||||
"$mod, C, killactive,"
|
||||
"$mod, M, exit,"
|
||||
"$mod, E, exec, dolphin"
|
||||
"$mod, V, togglefloating,"
|
||||
"$mod, R, exec, wofi --show drun"
|
||||
"$mod, P, pseudo,"
|
||||
"$mod, J, togglesplit,"
|
||||
|
||||
# Move focus
|
||||
"$mod, left, movefocus, l"
|
||||
"$mod, right, movefocus, r"
|
||||
"$mod, up, movefocus, u"
|
||||
"$mod, down, movefocus, d"
|
||||
|
||||
# Switch workspaces
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
"$mod, 0, workspace, 10"
|
||||
|
||||
# Move window to workspace
|
||||
"$mod SHIFT, 1, movetoworkspace, 1"
|
||||
"$mod SHIFT, 2, movetoworkspace, 2"
|
||||
"$mod SHIFT, 3, movetoworkspace, 3"
|
||||
"$mod SHIFT, 4, movetoworkspace, 4"
|
||||
"$mod SHIFT, 5, movetoworkspace, 5"
|
||||
"$mod SHIFT, 6, movetoworkspace, 6"
|
||||
"$mod SHIFT, 7, movetoworkspace, 7"
|
||||
"$mod SHIFT, 8, movetoworkspace, 8"
|
||||
"$mod SHIFT, 9, movetoworkspace, 9"
|
||||
"$mod SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
# Special workspace (scratchpad)
|
||||
"$mod, S, togglespecialworkspace, magic"
|
||||
"$mod SHIFT, S, movetoworkspace, special:magic"
|
||||
|
||||
# Scroll through workspaces
|
||||
"$mod, mouse_down, workspace, e+1"
|
||||
"$mod, mouse_up, workspace, e-1"
|
||||
];
|
||||
|
||||
# Mouse bindings
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
# Laptop specific configuration
|
||||
@@ -10,34 +10,29 @@
|
||||
isNormalUser = true;
|
||||
description = "Zephrynis";
|
||||
extraGroups = [ "networkmanager" "wheel" "video" "audio" ];
|
||||
shell = pkgs.zsh; # or pkgs.bash
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
# Enable zsh system-wide
|
||||
programs.zsh.enable = true;
|
||||
|
||||
# Display manager and desktop environment / window manager
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
# Hyprland - Tiling Wayland compositor
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
};
|
||||
|
||||
# Enable X11 for XWayland support
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Exclude unwanted packages from Plasma
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
||||
konsole
|
||||
elisa
|
||||
];
|
||||
|
||||
# Exclude xterm
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
|
||||
# Optional: Enable Wayland compositor
|
||||
# programs.hyprland = {
|
||||
# enable = true;
|
||||
# xwayland.enable = true;
|
||||
# };
|
||||
# Use SDDM for login (works with Wayland)
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
|
||||
# Laptop-specific power management
|
||||
# Choose either TLP or power-profiles-daemon (not both)
|
||||
|
||||
Reference in New Issue
Block a user