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";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Optional: Hyprland (if you want a tiling Wayland compositor)
|
# Hyprland - Tiling Wayland compositor
|
||||||
# hyprland.url = "github:hyprwm/Hyprland";
|
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||||
|
|
||||||
# Optional: Other useful inputs
|
# Optional: Other useful inputs
|
||||||
# nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
# 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)
|
# NixOS configuration for your hostname(s)
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# Desktop PC configuration
|
# Desktop PC configuration
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./hyprland.nix
|
||||||
|
];
|
||||||
|
|
||||||
# Home Manager configuration for user-level dotfiles and applications
|
# Home Manager configuration for user-level dotfiles and applications
|
||||||
|
|
||||||
home.username = "zeph";
|
home.username = "zeph";
|
||||||
@@ -22,6 +26,7 @@
|
|||||||
# wezterm
|
# wezterm
|
||||||
|
|
||||||
# File managers
|
# File managers
|
||||||
|
dolphin
|
||||||
# thunar
|
# thunar
|
||||||
# ranger
|
# ranger
|
||||||
# nnn
|
# nnn
|
||||||
@@ -38,20 +43,24 @@
|
|||||||
# slack
|
# slack
|
||||||
|
|
||||||
# Screenshots and screen recording
|
# Screenshots and screen recording
|
||||||
# flameshot
|
grim # Screenshot tool for Wayland
|
||||||
# maim
|
slurp # Screen area selector for Wayland
|
||||||
# obs-studio
|
# obs-studio
|
||||||
|
|
||||||
# System utilities
|
# Hyprland essentials
|
||||||
# rofi
|
waybar # Status bar
|
||||||
# dunst
|
dunst # Notifications
|
||||||
# polybar
|
wofi # App launcher
|
||||||
# picom
|
# rofi-wayland # Alternative launcher
|
||||||
|
|
||||||
|
# Wayland utilities
|
||||||
|
wl-clipboard # Clipboard for Wayland
|
||||||
|
|
||||||
# Ricing essentials
|
# Ricing essentials
|
||||||
|
# hyprpaper # Wallpaper daemon
|
||||||
|
# swww # Alternative animated wallpaper
|
||||||
# lxappearance
|
# lxappearance
|
||||||
# nitrogen # wallpaper setter
|
# pywal # Color scheme generator
|
||||||
# pywal # color scheme generator
|
|
||||||
|
|
||||||
# Themes and icons
|
# Themes and icons
|
||||||
# papirus-icon-theme
|
# 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
|
# Laptop specific configuration
|
||||||
@@ -10,34 +10,29 @@
|
|||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Zephrynis";
|
description = "Zephrynis";
|
||||||
extraGroups = [ "networkmanager" "wheel" "video" "audio" ];
|
extraGroups = [ "networkmanager" "wheel" "video" "audio" ];
|
||||||
shell = pkgs.zsh; # or pkgs.bash
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable zsh system-wide
|
# Enable zsh system-wide
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
# Display manager and desktop environment / window manager
|
# Hyprland - Tiling Wayland compositor
|
||||||
services.displayManager.sddm.enable = true;
|
programs.hyprland = {
|
||||||
services.desktopManager.plasma6.enable = true;
|
enable = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable X11 for XWayland support
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Exclude unwanted packages from Plasma
|
# Use SDDM for login (works with Wayland)
|
||||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
services.displayManager.sddm = {
|
||||||
konsole
|
enable = true;
|
||||||
elisa
|
wayland.enable = true;
|
||||||
];
|
};
|
||||||
|
|
||||||
# Exclude xterm
|
|
||||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
|
||||||
|
|
||||||
# Optional: Enable Wayland compositor
|
|
||||||
# programs.hyprland = {
|
|
||||||
# enable = true;
|
|
||||||
# xwayland.enable = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Laptop-specific power management
|
# Laptop-specific power management
|
||||||
# Choose either TLP or power-profiles-daemon (not both)
|
# Choose either TLP or power-profiles-daemon (not both)
|
||||||
|
|||||||
Reference in New Issue
Block a user