Initial NixOS config

This commit is contained in:
2025-11-19 08:42:21 +01:00
commit 61adc10c49
14 changed files with 1645 additions and 0 deletions

194
home/hyprland.nix Normal file
View File

@@ -0,0 +1,194 @@
{ config, pkgs, ... }:
{
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
settings = {
# Monitor configuration
monitor = ",preferred,auto,1";
# Startup applications
exec-once = [
"waybar"
"dunst"
"hyprpaper"
"nm-applet --indicator"
"blueman-applet"
];
# Environment variables
env = [
"XCURSOR_SIZE,24"
"QT_QPA_PLATFORMTHEME,qt5ct"
];
# Input configuration
input = {
kb_layout = "us";
follow_mouse = 1;
touchpad = {
natural_scroll = 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;
vibrancy = 0.1696;
};
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;
};
master = {
new_status = "master";
};
# Gestures
gestures = {
workspace_swipe = true;
};
# Misc
misc = {
force_default_wallpaper = 0;
disable_hyprland_logo = true;
};
# Window rules
windowrulev2 = [
"suppressevent maximize, class:.*"
"float, class:^(pavucontrol)$"
"float, class:^(blueman-manager)$"
];
# Keybindings
"$mainMod" = "SUPER";
bind = [
# Program launches
"$mainMod, Return, exec, kitty"
"$mainMod, Q, killactive,"
"$mainMod, M, exit,"
"$mainMod, E, exec, thunar"
"$mainMod, V, togglefloating,"
"$mainMod, D, exec, wofi --show drun"
"$mainMod, P, pseudo,"
"$mainMod, J, togglesplit,"
"$mainMod, F, fullscreen,"
# Screenshot
"$mainMod SHIFT, S, exec, grim -g \"$(slurp)\" - | wl-copy"
", Print, exec, grim -g \"$(slurp)\" ~/Pictures/screenshot_$(date +%Y%m%d_%H%M%S).png"
# Move focus
"$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d"
# Switch workspaces
"$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2"
"$mainMod, 3, workspace, 3"
"$mainMod, 4, workspace, 4"
"$mainMod, 5, workspace, 5"
"$mainMod, 6, workspace, 6"
"$mainMod, 7, workspace, 7"
"$mainMod, 8, workspace, 8"
"$mainMod, 9, workspace, 9"
"$mainMod, 0, workspace, 10"
# Move active window to workspace
"$mainMod SHIFT, 1, movetoworkspace, 1"
"$mainMod SHIFT, 2, movetoworkspace, 2"
"$mainMod SHIFT, 3, movetoworkspace, 3"
"$mainMod SHIFT, 4, movetoworkspace, 4"
"$mainMod SHIFT, 5, movetoworkspace, 5"
"$mainMod SHIFT, 6, movetoworkspace, 6"
"$mainMod SHIFT, 7, movetoworkspace, 7"
"$mainMod SHIFT, 8, movetoworkspace, 8"
"$mainMod SHIFT, 9, movetoworkspace, 9"
"$mainMod SHIFT, 0, movetoworkspace, 10"
# Scroll through workspaces
"$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1"
];
# Mouse bindings
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
# Volume and brightness keys
bindel = [
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
", XF86MonBrightnessUp, exec, brightnessctl s 10%+"
", XF86MonBrightnessDown, exec, brightnessctl s 10%-"
];
};
};
# Hyprpaper configuration
services.hyprpaper = {
enable = true;
settings = {
preload = [ "~/wallpapers/default.jpg" ];
wallpaper = [ ",~/wallpapers/default.jpg" ];
splash = false;
};
};
}